gdb macro to ease debugging JIT

Alexandre Oliva oliva at dcc.unicamp.br
Wed Aug 5 21:32:12 PDT 1998


Hi!

Some time ago, Patrick Tullmann posted a macro that would find a
method given a $pc.  Unfortunately, that macro was very slow because
it would loop on the classEntryPool looking for a method whose native
code interval contained the given address; furthermore, it wouldn't
always find the searched method, for some reason I don't completely
understand.

So I figured out it could be made much faster by using the function
findMethodFromPC provided by the Kaffe runtime.  Here's the macro,
(ab)use it as it pleases you.

define whereJIT
  set $meth = findMethodFromPC($pc)
  printf "%s.%s%s: %p %p\n", $meth.class->name.data,$meth->name.data, $meth->signature.data, $meth->c.ncode.ncode_start, $meth->c.ncode.ncode_end
end
document whereJIT
  Find information about the native method of the current PC
  By Alexandre Oliva <oliva at dcc.unicamp.br>
  Formatting stolen from macro by Patrick A Tullmann <tullmann at cs.utah.edu>
end

-- 
Alexandre Oliva
mailto:oliva at dcc.unicamp.br mailto:aoliva at acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



More information about the kaffe mailing list