Breakpoints on JITted code

Edd Barrett <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
Hi,

I've recently implemented a simple gdb plugin [0] for a JIT I'm working on.

Lineinfo is working well, but I was expecting to be able to set breakpoints on
the names of JITted code functions (where the name is the one passed to the
`name` argument of block_open()), but this doesn't appear to be the case. gdb
allows me to set a pending breakpoint, but doesn't stop when a JITted function
of that name is reached.

Should I be able to set breakpoints by name for JITted code functions?

I'm using gdb-13.1 on Debian/amd64. I tried with gdb-14.2, but something about
my plugin causes gdb to crash with:
```
internal-error: sect_index_text not initialized".
```

Applying this patch [1] doesn't make that go away:

Cheers

[0] https://github.com/ykjit/yk/blob/master/ykrt/yk_gdb_plugin/yk_gdb_plugin.c
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=25678#c5

-- 
Best Regards
Edd Barrett

https://www.theunixzoo.co.uk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.