gdb and OpenJDK
Yasumasa Suenaga
yasuenag at gmail.com
Thu Feb 12 14:35:12 UTC 2015
Hi Jeremy,
IcedTea OpenJDK, which is shipped from Linux Distros (e.g. Fedora) contains
jstack.stp .
jstack.stp is SystemTap tapset - it can parse Java and native frame from thread stack.
You may use its implementation on GDB.
Thanks,
Yasumasa
IcedTea Committer
On 2015/02/12 7:27, Jeremy Manson wrote:
> Hey folks,
>
> I think I've mentioned to some of the people on this list that we (and by
> we, I mean Sasha Smundak) have been working on interoperability between gdb
> and Java. Basically, what we have now allows us to get a backtrace in gdb
> that includes Java frames with parameter values (no local variables yet).
>
> Needless to say, this has been terribly, terribly helpful in our JVM and
> JNI debugging.
>
> Support for this feature is basically two parts:
>
> First, gdb needed to be extended to support the ability to plug in a frame
> unwinder. The process of submitting this to gdb (which has been ongoing
> for quite a while) is finally starting to make reasonable progress.
>
> Next, we need a plugin for OpenJDK. We have a plugin written that calls
> out to the serviceability agent. (It's written in Python, per gdb's
> requirements).
>
> Pending the gdb support being finalized, we'd love to contribute the plugin
> to OpenJDK. What should we do make that happen? Write a JEP and submit
> it to this list? Technically, neither of us are committers (which you need
> to be to submit a JEP), but I imagine we can work around that.
>
> Here's the gdb patch, for anyone interested:
>
> https://sourceware.org/ml/gdb-patches/2014-12/msg00408.html
>
> Thanks!
>
> Jeremy
>
More information about the serviceability-dev
mailing list