From: Daniel Jacobowitz <drow@false.org>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Cc: gdb@sourceware.org
Subject: Re: GDB and the OpenJDK JVM
Date: Mon, 13 Feb 2012 18:39:00 -0000 [thread overview]
Message-ID: <CAN9gPaGnFS7oZUkGfU=cWrZ-sxkf+F=uxevvGcn24UvM5xgjxA@mail.gmail.com> (raw)
In-Reply-To: <1328822151.2294.12.camel@soleil>
On Thu, Feb 9, 2012 at 4:15 PM, Philippe Waroquiers
<philippe.waroquiers@skynet.be> wrote:
>
> I am not sure I fully understand the difference between bytecode
> debugging/source level debugging of the code running on the VM
> and e.g.
> >> * Showing information about Java objects given JNI handles
> >> * Interleaving Java frames in the stack trace
> >> * Fabricating unwind information for JIT'd code
It's primarily a matter of context. When you have a C++ debugger
attached to the JVM, also communicating with it on a socket is quite
tricky - we'd have to let the debug thread run, and hope it didn't
deadlock with some other stopped thread. I want to expose the JVM
details while intrusively debugging the encompassing program.
Also I am not sure you can get things at the level of a JNI handle
over JWDP; those don't exist when you're looking at inside the VM.
We'd still need some way to associate the C++ jobject handles with VM
entities.
> You might also take a look at a recent version of hp wdb (hp modified
> gdb). IIUC, it has some support for mixed Java and other lang debugging.
> E.g. here is an extract of the manual:
>
> "Using WDB to examine backtraces in JavaTM thread stacks
> You can now use HP's debugger WDB 3.0.01 or later (the GNU Debugger GDB) to
> examine backtraces containing mixed language frames (JavaTM and C/C++) in JavaTM
> thread stacks. This will simplify debugging the VM and JavaTM mixed-language
> applications. Set the environment variable GDB_JAVA_UNWINDLIB to the path name
> of the JavaTM Unwind Shared Library libjunwind, which is in the JDK."
Yes, this is very closely related to what I want to do. I wonder if
it requires changes to HP's JDK... I do not see references to
libjunwind outside of HP-UX.
--
Thanks,
Daniel
next prev parent reply other threads:[~2012-02-13 18:39 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 [this message]
2012-02-10 17:24 ` Gary Benson
2012-02-13 9:11 ` Mark Wielaard
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='CAN9gPaGnFS7oZUkGfU=cWrZ-sxkf+F=uxevvGcn24UvM5xgjxA@mail.gmail.com' \
--to=drow@false.org \
--cc=gdb@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
/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