Re: Breakpoints on JITted code
Tom Tromey <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "Edd" == Edd Barrett <[email protected]> writes: Sorry this didn't get a response. Edd> Lineinfo is working well, but I was expecting to be able to set breakpoints on Edd> the names of JITted code functions (where the name is the one passed to the Edd> `name` argument of block_open()), but this doesn't appear to be the case. gdb Edd> allows me to set a pending breakpoint, but doesn't stop when a JITted function Edd> of that name is reached. Edd> Should I be able to set breakpoints by name for JITted code functions? Based on looking at gdb/jit.c I think I'd expect that to work. It's creating function domain symbols in finalize_symtab. Maybe turning on some symbol lookup debug logging would help -- not sure. Or just debugging gdb itself, that's what I'd try. Edd> I'm using gdb-13.1 on Debian/amd64. I tried with gdb-14.2, but something about Edd> my plugin causes gdb to crash with: Edd> ``` Edd> internal-error: sect_index_text not initialized". Edd> ``` Some parts of gdb expect objfiles to have a text section. This is a longstanding bug but nobody's ever fixed it, presumably because a data-only shared library is pretty rare. Tom