Hotspot JVM GDBJIT plugin

Tom Tromey tromey@redhat.com
Fri May 25 14:37:00 GMT 2012


>>>>> "Kaushik" == Kaushik Srenevasan <kaushik@twitter.com> writes:

Kaushik> I've been working on a Hotspot JVM JIT plugin for GDB

Very cool.

Kaushik> I'm writing to see if there is any interest in pulling the
Kaushik> changes [3] I've had to make to GDB, to get this to work.

Sure.  Just send individual patches following the contribution
instructions...

Kaushik> The first of these changes [3] is a simple fix to a crash while
Kaushik> trying to display the return type of a JIT frame (say on
Kaushik> 'finish'.)

Sounds good.

Kaushik> The second (frame based symbol handler) is a feature added to
Kaushik> help GDB understand frames created by Hotspot's "template"
Kaushik> interpreter.

Kaushik> This adds an additional callback that the reader may choose to
Kaushik> implement to return the name (file path or line number) of the
Kaushik> function executing in the frame in question.

Phil has been working on a related feature in gdb, called "frame
filters".  Frame filters let you write Python code to modify frames as
they are being displayed; you can change nearly any aspect of a frame,
and even insert and delete frames.  The primary use case for this
feature is displaying better stack traces in interpreters.

So, you might consider just waiting for this and writing your frame
logic in Python.

If you'd rather press on, that is fine too.

Tom



More information about the Gdb mailing list