This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: status of Darwin support



On Aug 6, 2009, at 1:13 PM, Christian Thalinger wrote:


Joel Brobecker wrote:
Joel would probably know. My best guess is that even if Darwin support
is much better now, the MI incompatibilities would mean that you
wouldn't be able to drop FSF's GDB in place of Apple's for Xcode.

Actually, I won't know that much more. Tristan is the one who looks after that port. As far as I know, we're using it internally, to debug GNAT for instance, and it seems to be working well. Thiago is right about the bunch of local additions that Apple made to GDB, though.

Hmm, I have problems with shared libraries. One thing is that the shared library is only found when it's in the current directory, otherwise:

(gdb) r
Starting program: /Users/twisti/bsd-port/hotspot/build/bsd/ bsd_i486_compiler2/jvmg/gamma
dyld: Library not loaded: libjvm.dylib
Referenced from: /Users/twisti/bsd-port/hotspot/build/bsd/ bsd_i486_compiler2/jvmg/gamma
Reason: image not found


Even if the path to the library is in DYLD_LIBRARY_PATH.

Unknown issue. Can you try to investigate by yourself (ie, check that your program can see DYLD_LIBRARY_PATH and is not setuid/setgid) ?


You may also post a tiny reproducer and I will look at this when I have spare time.


 The other
problem is that debugging symbols for shared libraries are not loaded.
I can set a breakpoint in the main executable and debug it:

(gdb) c
Continuing.

Breakpoint 2, CreateExecutionEnvironment (_argcp=0xbffff630, _argvp=0xbffff634, jrepath=0xbffff194 "", so_jrepath=1024, jvmpath=0xbfffed94 "", so_jvmpath=1024,
original_argv=0x1005c0) at /Users/twisti/bsd-port/hotspot/src/os/ bsd/launcher/java_md.c:238
238 char *execname = NULL;
(gdb) bt
#0 CreateExecutionEnvironment (_argcp=0xbffff630, _argvp=0xbffff634, jrepath=0xbffff194 "", so_jrepath=1024, jvmpath=0xbfffed94 "", so_jvmpath=1024, original_argv=0x1005c0)
at /Users/twisti/bsd-port/hotspot/src/os/bsd/launcher/java_md.c:238
#1 0x00001ce6 in main (argc=2, argv=0xbffff654) at /Users/twisti/ bsd-port/hotspot/src/os/bsd/launcher/java.c:250


But an assert in the shared library gives:

And yes, it has debugging symbols. Anything I can do to change that?

I have just committed a patch that may fix this issue.


Do not hesitate to report issues also gdb for Darwin is not yet feature full.

Tristan.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]