Re: Is nexti confused by pushq?
Dmitry Samersoff <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Tom, > for the JIT you'd want to do something similar. I thought there was > already such an unwinder for OpenJDK at least... ? Yes, JDK has different kind of unwinders but unfortunately porting it to python is problematic. It reminds me old discussion about a native plugin interface for gdb -Dmitry On 26.02.2019 22:05, Tom Tromey wrote: >>>>>> "David" == David Griffiths <[email protected]> writes: > > David> Ok, so in my case this is generated code with no debug info (Java JIT > David> generated) so does that mean I shouldn't attempt to use nexti? (I've got > David> other issues which probably preclude using nexti anyway but just curious) > > There are a few options to deal with this sort of problem. > > As Jan said, the JIT could generate debug info using one of the > gdb-provided JIT interfaces. That's kind of heavyweight but gives a lot > of control. > > Another option is to write an unwinder in Python. The crucial thing > here is to ensure that the frame ID is constant for the duration of a > frame. In DWARF this is done by using the CFA as part of the identity; > for the JIT you'd want to do something similar. I thought there was > already such an unwinder for OpenJDK at least... ? > > Tom >