public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* SIGINT causes gdb to abort with Python API
@ 2021-10-27 20:00 McAllister, Colin
  0 siblings, 0 replies; only message in thread
From: McAllister, Colin @ 2021-10-27 20:00 UTC (permalink / raw)
  To: gdb

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-27 20:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 20:00 SIGINT causes gdb to abort with Python API McAllister, Colin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).