Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "John Que" <qwejohn@hotmail.com>
To: gdb@sources.redhat.com
Subject: debugging a core dump generated from Java with JNI
Date: Wed, 23 Feb 2005 17:25:00 -0000	[thread overview]
Message-ID: <BAY14-F85467C4B93A07D4C1D727AF630@phx.gbl> (raw)

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/


             reply	other threads:[~2005-02-23 16:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-23 17:25 John Que [this message]
2005-02-23 18:37 ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BAY14-F85467C4B93A07D4C1D727AF630@phx.gbl \
    --to=qwejohn@hotmail.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox