This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
debugging a core dump generated from Java with JNI
- From: "John Que" <qwejohn at hotmail dot com>
- To: gdb at sources dot redhat dot com
- Date: Wed, 23 Feb 2005 18:55:15 +0200
- Subject: debugging a core dump generated from Java with JNI
- Bcc:
Hello,
I am developing a java application which calls a procedure in "C"
using JNI.
It is developed on a Linux RedHat 9 x86 intel box.
Sometimes this procedure crashes and a coredeump (core.pid) file is created.
So I wanted to know how to debug it; So i changed that "c" method so the
only thing
it does now is call abort() so it will make a core dump.
I had build my c code with -g flag.
When I opened gdb like thus:
gdb /usr/java/usr/java/j2sdk1.4.2_06/bin/java core.pid
and performedc bt I did not see source code;
So I upgraded to latest version of gdb (6.3) and tried again.
what I see is :
Core was generated by `/opt/JBuilderX/jdk1.4/bin/java -classpath
/work/dev/transcode/release:/opt/JBui'.
Program terminated with signal 6, Aborted.
#0 0x400a9671 in ?? ()
Setting up the environment for debugging gdb.
Function "internal_error" not defined.
Function "info_command" not defined.
No breakpoint number 0.
(gdb)
(gdb)
(gdb)
(gdb)
(gdb) bt
#0 0x400a9671 in ?? ()
#1 0x40035afd in ?? ()
#2 0x0000426e in ?? ()
#3 0x00000006 in ?? ()
#4 0x00000001 in ?? ()
#5 0x4003c378 in ?? ()
#6 0x00000006 in ?? ()
#7 0x4d34ceb0 in ?? ()
#8 0x4d34cd2c in ?? ()
#9 0x40035e9b in ?? ()
#10 0x0002c00c in ?? ()
#11 0x00000006 in ?? ()
#12 0x00000001 in ?? ()
#13 0x00000000 in ?? ()
#14 0x401b6980 in ?? ()
#15 0x00000006 in ?? ()
#16 0x4d34cd4c in ?? ()
#17 0x400a9414 in ?? ()
#18 0x00000006 in ?? ()
#19 0x4d34ceb0 in ?? ()
#20 0x4d34cd4c in ?? ()
#21 0x40033f25 in ?? ()
#22 0x401b6980 in ?? ()
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb)
Why am I not seeing source code so I can know where it occured ?
what should I do in order to see the source code in a debug session with gdb
and a crasg from java program running jni?
Regads,
John Q.
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/