Subject: Re: Debugging core dumps from Linux-emulated apps
To: Christos Zoulas <>
From: Brian de Alwis <>
List: netbsd-users
Date: 04/17/2007 10:21:43
On 2007.04.17 02:10:11 +0000, Christos Zoulas wrote:
> I was able to debug a 64 bit linux 1.6.0_01 jvm with NetBSD-current.

With the NetBSD-shipped gdb?  I haven't had any success when I've
tried this: when I try I ususally get a SIGTRAP, followed by an
unknown signal, and then the process generally appears to hang:

    (gdb) run
    Starting program: /usr/pkg/java/sun-1.5/bin/java 
    warning: no shared library support for this OS / ABI

    Program received signal SIGTRAP, Trace/breakpoint trap.
    0xbbbe97c0 in ?? ()
    (gdb) c

    Program received signal ?, Unknown signal.
    0xbbb9b224 in ?? ()
    (gdb) c
    warning: Signal ? does not exist on this system.

> Perhaps gdb 6.x supports this? Try the pkgsrc version.

Tried it -- it is compiled with the NetBSD symbols, and behaves
no differently from the shipped gdb.

I also made the SuSE GDB as a package in wip/suse100_gdb, but it
won't read the core file as it's in NetBSD ELF format.  Trying to
run a binary behaves similar to the above, except instead of a 
SIGTRAP, it generally proceeds as:

    (gdb) run
    Starting program: /usr/pkg/emul/linux/usr/java/bin/java 
    linux_test_for_tracefork: waitpid: Interrupted system call.
    (gdb) c

    Program received signal SIGTRAP, Trace/breakpoint trap.
    0xbbbe9863 in ?? ()
    (gdb) c

    Program received signal SIG32, Real-time event 32.
    0xbbb9a2c7 in ?? ()
    (gdb) c

and then appears to hang.


  Brian de Alwis | Software Practices Lab | UBC |
      "Amusement to an observing mind is study." - Benjamin Disraeli