public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mjw@redhat.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb@sourceware.org
Subject: Re: GDB and the OpenJDK JVM
Date: Mon, 13 Feb 2012 09:11:00 -0000	[thread overview]
Message-ID: <1329124283.2783.15.camel@springer.wildebeest.org> (raw)
In-Reply-To: <CAN9gPaHVeZ+OTN47Tfqfdy4uCdDjU0du68q+8ZnuMf+uJjDqbg@mail.gmail.com>

On Tue, 2012-02-07 at 14:58 -0500, Daniel Jacobowitz wrote:
> Has anyone investigated non-trivial integration between GDB and this
> (or any other) JVM?  So far I haven't turned up anything useful.  Some
> examples of the sorts of integration I mean:
> 
> * Showing information about Java objects given JNI handles
> * Interleaving Java frames in the stack trace
> * Fabricating unwind information for JIT'd code
> * Automatically handling SEGVs related to the garbage collector
> without hiding SEGVs for native code

For SystemTap I wrote some hotspot heap introspection functions that
might be interesting. But, like Gary said, hotspot might have internal
debug accessor functions that you can use too. Systemtap cannot call
into the inferior so we needed some code that went through the java code
heap and stack unwind "by hand":
http://icedtea.classpath.org/hg/icedtea6/file/tip/tapset/jstack.stp.in
If you can make inferior function calls however (and know it is safe to
call them) then that will be much easier. The above systemtap tapset is
somewhat fragile since it depends on a lot of hotspot code generator
internals.

Cheers,

Mark

  parent reply	other threads:[~2012-02-13  9:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-07 19:58 Daniel Jacobowitz
2012-02-09 16:16 ` Gary Benson
2012-02-09 18:33   ` Daniel Jacobowitz
2012-02-09 20:21     ` Philippe Waroquiers
2012-02-09 20:47       ` Daniel Jacobowitz
2012-02-09 21:15         ` Philippe Waroquiers
2012-02-13 18:39           ` Daniel Jacobowitz
2012-02-10 17:24     ` Gary Benson
2012-02-13  9:11 ` Mark Wielaard [this message]
2012-02-13 18:44   ` Daniel Jacobowitz
2012-02-13 18:57     ` Tom Tromey
2012-02-13 19:39       ` Daniel Jacobowitz
2012-02-13 19:54         ` Tom Tromey

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=1329124283.2783.15.camel@springer.wildebeest.org \
    --to=mjw@redhat.com \
    --cc=drow@false.org \
    --cc=gdb@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).