Problems merging DNS JNDI code

Bryce McKinlay
Wed Feb 20 04:21:00 GMT 2002

Pete Chown wrote:

>If I run it under gdb, I get a SIGPIPE during the printStackTrace:

One trick that may be helpful here is to put a breakpoint on the 
_Jv_Throw function. This way gdb will stop where the exception is thrown 
so you can get a full backtrace and poke around. Note that you may need 
to break on "main" first so that gdb can see all the symbols for libgcj.


$ gdb ./a.out
GNU gdb 2001-12-21-cvs
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) b main
Breakpoint 1 at 0x8048b30: file /tmp/cctlb6Ri.i, line 10.
(gdb) r
Starting program: /home/bryce/./a.out
[New Thread 1024 (LWP 5244)]
[Switching to Thread 1024 (LWP 5244)]

Breakpoint 1, main (argc=1, argv=0xbffffa64) at /tmp/cctlb6Ri.i:10
10      /tmp/cctlb6Ri.i: No such file or directory.
        in /tmp/cctlb6Ri.i
(gdb) b _Jv_Throw
During symbol reading, const value length mismatch for 
'__gcj_exception_class', got 8, expected 0.
Breakpoint 2 at 0x402203ed: file ../../../libjava/, line 84.
(gdb) c
[New Thread 2049 (LWP 5245)]
[New Thread 1026 (LWP 5246)]

Breakpoint 2, _Jv_Throw (value=0x80b5f60) at 
84          = static_cast<java_exception_header *>(_Jv_AllocRawObj 
(sizeof (*xh)));
Current language:  auto; currently c++
(gdb) bt
#0  _Jv_Throw (value=0x80b5f60) at ../../../libjava/
#1  0x08048b97 in Doofus.main(java.lang.String[]) (args=0x8076fd8)
#2  0x4022c2a8 in gnu::gcj::runtime::FirstThread::call_main() 
    at ../../../libjava/gnu/gcj/runtime/
#3  0x402b6138 in (this=0x80b9fc0)
    at ../../../libjava/gnu/gcj/runtime/



More information about the Java mailing list