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


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.  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:

Current thread is 2954858496
Dumping core ...
[New Thread 0x1f03 of process 71094]
[New Thread 0x2003 of process 71094]
[New Thread 0x2103 of process 71094]
[New Thread 0x2203 of process 71094]
[New Thread 0x2303 of process 71094]
[New Thread 0x2403 of process 71094]

Program received signal SIGABRT, Aborted.
0x95bd046e in ?? ()
(gdb) info threads
  7 Thread 0x2403 of process 71094  0x95bd046e in ?? ()
  6 Thread 0x2303 of process 71094  0x95ca5136 in ?? ()
  5 Thread 0x2203 of process 71094  0x95bc92c2 in ?? ()
  4 Thread 0x2103 of process 71094  0x95bd046e in ?? ()
  3 Thread 0x2003 of process 71094  0x95bd046e in ?? ()
  2 Thread 0x1f03 of process 71094  0x95bd046e in ?? ()
* 1 Thread 0x1d03 of process 71094  0x95bd046e in ?? ()
(gdb) bt
#0  0x95bd046e in ?? ()
#1  0x95bfb3e6 in ?? ()
#2  0x00001803 in ?? ()
#3  0x00001903 in ?? ()
#4  0x00000000 in ?? ()

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

-- Christian


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