This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB and the OpenJDK JVM
On Mon, Feb 13, 2012 at 4:11 AM, Mark Wielaard <mjw@redhat.com> wrote:
> 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.
Ooh, this is very interesting. Thanks!
Overall, I would prefer not to call into the inferior. That's how I
feel pretty much all the time, because (A) core dumps matter a great
deal, (B) calling the inferior is fragile in its own ways, and (C)
calling the inferior is slowwwwww. I'll do it if I have to, but I'd
rather rely on the symbol table of the JDK and manually maintained
code.
--
Thanks,
Daniel