Question about Python API actions on breakpoint hits
Tom Tromey
tom@tromey.com
Thu Jan 25 17:08:38 GMT 2024
>>>>> "Matheus" == Matheus Branco Borella via Gdb <gdb@sourceware.org> writes:
Matheus> Hey there, all. I have been, as of recently, writing some features for a GDB
Matheus> plug-in written in Python called pwndbg. And during that, twice I've come across
Matheus> this one limitation regarding changing the state of the inferior from within the
Matheus> `gdb.Breakpoint.stop()` function, which includes changing breakpoints. I've got
Matheus> a few questions regarding this limitation.
[...]
Matheus> I've read the documentation, and indeed, doing these changes during `.stop()`
Matheus> is not a supported use case[2]. And additionally, to the best of my knowledge,
Matheus> there does not seem to be a supported way to, in reaction to a breakpoint,
Matheus> change the state of the inferior, that doesn't also have the issues I outlined
Matheus> above.
Matheus> My question is, why is that? Is there anything major blocking proper support for
Matheus> such a feature being implemented? And if so, what is it?
TBH I am not sure. Maybe nobody really knows -- probably the only
answer is to try it and then debug gdb and figure out what is going
wrong.
Tom
More information about the Gdb
mailing list