On Fri, 2022-05-13 at 09:33 +0000, Ludvig Janiuk via Gdb wrote:
> Hi,
>
> I'd like to report an error in the page "23.3.2.11 Writing a Frame Filter" at
> https://sourceware.org/gdb/onlinedocs/gdb/Writing-a-Frame-Filter.html#Writing-a-Frame-Filter
>
> One of the code listings mentions "ElidingFrameDecorator", however this class is never defined. I believe "ElidingInlineDecorator" was intended.
>
> While I'm at it, I'd also like to ask a question on the Python API. I have a script which unwinds and filters Java Virtual Machine frames, and it seems to
> work well in backtraces (gdb command "bt"). However, when I want to look closer on one of the frames (gdb command "frame <X>"), I get something like "#5
> 0x00007fffd96f923e in ?? ()" again. Does the Python frame unwinding API only apply to the backtrace command, or is there something I can do to make my Java
> frames visible also in the output of other commands?
You can implement FrameDecorator that would provide proper (method) name for given frame
(and even source and line number, local variables - see FrameDecorator API).
This helps, but still, other GDB commands won't know anything about JITed code so
you cannot easily set breakpoints or disassembly them. AFAIK, there's no Python
API for that. I'm doing some experiments towards having that (see my other email [1]),
but it is still very much WIP.
HTH, Jan
[1]: https://sourceware.org/pipermail/gdb/2022-May/050124.html
>
> Best regards,
> //Ludvig Janiuk
> Oracle