Subject: Re: Debugging core dumps from Linux-emulated apps
To: Brian de Alwis <bsd@cs.ubc.ca>
From: Christos Zoulas <christos@zoulas.com>
List: netbsd-users
Date: 04/17/2007 14:33:06
On Apr 17, 10:21am, bsd@cs.ubc.ca (Brian de Alwis) wrote:
-- Subject: Re: Debugging core dumps from Linux-emulated apps

| 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
|     Continuing.
| 
|     Program received signal ?, Unknown signal.
|     0xbbb9b224 in ?? ()
|     (gdb) c
|     Continuing.
|     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
|     Continuing.
| 
|     Program received signal SIGTRAP, Trace/breakpoint trap.
|     0xbbbe9863 in ?? ()
|     (gdb) c
|     Continuing.
| 
|     Program received signal SIG32, Real-time event 32.
|     0xbbb9a2c7 in ?? ()
|     (gdb) c
|     Continuing.
| 
| and then appears to hang.
| 
| Brian.

I'll try again. I have to find and i386 box that has java on it...
It seems that x86_64 perhaps behaves differently.

christos