* debugging a core dump generated from Java with JNI
@ 2005-02-23 17:25 John Que
2005-02-23 18:37 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: John Que @ 2005-02-23 17:25 UTC (permalink / raw)
To: gdb
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: debugging a core dump generated from Java with JNI
2005-02-23 17:25 debugging a core dump generated from Java with JNI John Que
@ 2005-02-23 18:37 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2005-02-23 18:37 UTC (permalink / raw)
To: John Que; +Cc: gdb
On Wed, Feb 23, 2005 at 06:55:15PM +0200, John Que wrote:
> 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
Sorry, but it looks like the JDK loads objects in a way that GDB
doesn't understand. You'd have to use a debugger that supported the
Sun JDK to debug this.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-02-23 17:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-23 17:25 debugging a core dump generated from Java with JNI John Que
2005-02-23 18:37 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox