SIGINT causes gdb to abort with Python API
"McAllister, Colin via Gdb" <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I've been dealing with an issue recently where gdb 9.1 aborts while using the Python API.
If I call gdb.execute("run"), the program I'm debugging with gdb will behave as expected. However, when I generate a keyboard interrupt to stop the program and insert a breakpoint, gdb aborts.
Based on the docs, this seems to be somewhat expected as the docs for execute say "If a GDB exception happens while command runs, it is translated as described in Exception Handling."
The tricky thing is I wrapped gdb.execute("run") in a try block to handle a KeyboardIntteruppt exception and have not been able to trigger the exception. Instead gdb aborts and my python code no longer runs.
On a side note, I've noticed I get the desired behavior if I run gdb.execute("start") and then enter "continue" in my prompt. Generating a KeyBoard interrupt stops the program and I'm able to insert breakpoints.
Curious if anyone can provide any insight into this issue that may be able to allow me to call "run" with execute.
Thanks, Colin