jit interface and jit reader

Frank Tetzel s1445051@mail.zih.tu-dresden.de
Fri Jan 18 10:50:00 GMT 2019


I have trouble getting GDB's jit interface to work. I'm trying to make
application using AsmJit [1] easier to debug by being able to break
when entering jitted code. As AsmJit is just an assembler returning a
function pointer to the generated code, I do not want to create an
object file for it. That is why I'm trying to use jit-reader, but the
symbol does not seem to show up in GDB and a pending breakpoint is
never hit.

What am I doing wrong? I attached two files: gdbjit.cpp is talking to
GDB via the jit interface. gdbjit-reader.c is the jit reader for GDB
which I compile to a shared object and load in GDB with jit-reader-load.

It does not implement unwind and get_frame_id. Do I need these
functions? unwind is called sometimes. Is there a minimal example
somewhere which implements jit reader?

Best regards,

[1] https://github.com/asmjit/asmjit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdbjit.cpp
Type: text/x-c++src
Size: 2029 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb/attachments/20190118/795182b5/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdbjit-reader.c
Type: text/x-c++src
Size: 1752 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb/attachments/20190118/795182b5/attachment-0001.bin>

More information about the Gdb mailing list