Re: Why does Xcode's GDB Stop in "dyld_func_lookup_pointer"?
Re: Why does Xcode's GDB Stop in "dyld_func_lookup_pointer"?
- Subject: Re: Why does Xcode's GDB Stop in "dyld_func_lookup_pointer"?
- From: Philip Mötteli <email@hidden>
- Date: Thu, 20 Nov 2003 12:13:28 +0100
Hello
I have the next case:
dyld: /private/tmp/MultiMarkets version mismatch for library:
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
(compatibility version of user: 32736.0.8 greater than library's
version: 300.0.0)
The backtrace:
(gdb) bt
#0 0x8fe019e0 in halt ()
#1 0x8fe0acf4 in link_edit_error ()
#2 0x8fe0428c in map_library_image ()
#3 0x8fe03930 in load_library_image ()
#4 0x8fe06a0c in load_images_libraries ()
#5 0x8fe02e18 in load_executable_image ()
#6 0x8fe01b70 in _dyld_init ()
As usual, in Xcode, it doesn't run and in the terminal or DDD it runs
flawlessly.
Am 17.11.2003 um 18:10 schrieb Jim Ingham:
So the thing we have to determine is what is causing dyld not to be
able to look up the symbols. Most likely it is something in the
environment that is different between running under command line gdb,
and under Xcode. You can compare these pretty easily. In Xcode, open
the gdb console window and type
(gdb) show env
do the same when running under command-line gdb
Here's the environment for Xcode:
SHELL=/bin/zsh
USER=moetteli
SSH_AUTH_SOCK=/tmp/500/nl.uu.phil.SSHAgent.socket
__CF_USER_TEXT_ENCODING=0x1F4:0:19
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/Users/moetteli
PWD=/private/tmp
SHLVL=0
HOME=/Users/moetteli
DISPLAY=:0.0
SECURITYSESSIONID=20fd70
DYLD_IMAGE_SUFFIX=_debug
DYLD_INSERT_LIBRARIES=/Developer/Applications/Xcode.app/Contents/
PlugIns/GDBMIDebugging.pbplugin/Contents/Resources/
PBGDBIntrospectionSupport.A.dylib
NSUnbufferedIO=YES
DYLD_PRINT_LIBRARIES=1
DYLD_LIBRARY_PATH=/tmp
DYLD_FRAMEWORK_PATH=/tmp
DYLD_NEW_LOCAL_SHARED_REGIONS=YES
DYLD_NO_FIX_PREBINDING=YES
And here for GDB in the command line:
MANPATH=/sw/share/man:/Users/moetteli/Unix/man:/usr/local/man:/usr/
share/man:/usr/X11R6/man
TERM_PROGRAM=Apple_Terminal
TERM=xterm-color
SHELL=/bin/zsh
PERL5LIB=/sw/lib/perl5
TERM_PROGRAM_VERSION=100
ANT_HOME=/sw/lib/ant
SGML_CATALOG_FILES=/sw/etc/sgml/catalog
USER=moetteli
SSH_AUTH_SOCK=/tmp/500/nl.uu.phil.SSHAgent.socket
__CF_USER_TEXT_ENCODING=0x1F4:0:19
PATH=/sw/bin:/sw/sbin:/Users/moetteli/Unix/bin:/usr/local/bin:/usr/ucb:
/bin:/usr/bin:/etc:/usr/etc:/usr/sbin:/sbin:/usr/X/bin:/usr/sybase/bin:
/Users/moetteli/Apps:/LocalApps:/NextApps:/NextAdmin:/NextDeveloper/
Demos:/usr/sybase/bin:/Users/moetteli/Unix/bin:/usr/local/postgres95/
bin:.:/usr/X11R6/bin
XML_CATALOG_FILES=/sw/etc/xml/catalog
PWD=/Users/moetteli
JAVA_HOME=/Library/Java/Home
LD_PREBIND_ALLOW_OVERLAP=1
SHLVL=1
HOME=/Users/moetteli
LD_PREBIND=1
LD_SEG_ADDR_TABLE=/sw/var/lib/fink/prebound/seg_addr_table
LOGNAME=moetteli
INFOPATH=/sw/share/info:/sw/info:/usr/share/info
DISPLAY=:0.0
SECURITYSESSIONID=20fd70
and see if anything suspicious shows up.
In Xcode, I see a lot of dyld specific settings, which are completely
missing from the commandline. But which one(s) and how I need to change
them in order to debug the problem, I don't know.
There is also an environment variable that you can set to help debug
dyld problems. Setting DYLD_PRINT_LIBRARIES to 1 will dump a printout
of all the libraries as they are being loaded to stdout. Presumably
the last one in the list will be what is causing the problem.
run
[Switching to process 4674 local thread 0xe03]
warning: Unable to resolve "(null)"; not loading.
warning: Unable to resolve "(null)"; not loading.
warning: Unable to resolve "(null)"; not loading.
warning: Unable to resolve "(null)"; not loading.
warning: Mapped symbol file "/usr/libexec/gdb/symfiles/dyld.syms" uses
a different prefix ("__dyld_") than the one requested (""); ignoring
Running...
Temporarily disabling shared library breakpoints: 1
Program received signal: "SIGTRAP".
loading libraries for
DYLD_INSERT_LIBRARIES=/Developer/Applications/Xcode.app/Contents/
PlugIns/GDBMIDebugging.pbplugin/Contents/Resources/
PBGDBIntrospectionSupport.A.dylib
loading library:
/Developer/Applications/Xcode.app/Contents/PlugIns/
GDBMIDebugging.pbplugin/Contents/Resources/
PBGDBIntrospectionSupport.A.dylib
loading libraries for image: /bin/zsh
loading library: /usr/lib/libSystem.B_debug.dylib
loading library: /usr/lib/libncurses.5.dylib
loading libraries for image:
/Developer/Applications/Xcode.app/Contents/PlugIns/
GDBMIDebugging.pbplugin/Contents/Resources/
PBGDBIntrospectionSupport.A.dylib
loading libraries for image: /usr/lib/libSystem.B_debug.dylib
loading library: /usr/lib/system/libmathCommon.A_debug.dylib
loading libraries for image: /usr/lib/libncurses.5.dylib
loading libraries for image: /usr/lib/system/libmathCommon.A_debug.dylib
loading libraries for
DYLD_INSERT_LIBRARIES=/Developer/Applications/Xcode.app/Contents/
PlugIns/GDBMIDebugging.pbplugin/Contents/Resources/
PBGDBIntrospectionSupport.A.dylib
loading library:
/Developer/Applications/Xcode.app/Contents/PlugIns/
GDBMIDebugging.pbplugin/Contents/Resources/
PBGDBIntrospectionSupport.A.dylib
loading libraries for image: /private/tmp/MultiMarkets
loading library:
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
dyld: /private/tmp/MultiMarkets version mismatch for library:
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
(compatibility version of user: 32736.0.8 greater than library's
version: 300.0.0)
If you don't see anything obvious, feel free to send along the results
of show env for both environments, and the DYLD_PRINT_LIBRARIES
output, and we will see if we can see anything.
Thanks a lot!
Phil
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.