aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-utils.c')
-rw-r--r--gdb/python/py-utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c
index e0aedb5..a587644 100644
--- a/gdb/python/py-utils.c
+++ b/gdb/python/py-utils.c
@@ -422,7 +422,9 @@ gdbpy_handle_exception ()
for user errors. However, a missing message for gdb.GdbError
exceptions is arguably a bug, so we flag it as such. */
- if (! PyErr_GivenExceptionMatches (ptype, gdbpy_gdberror_exc)
+ if (PyErr_GivenExceptionMatches (ptype, PyExc_KeyboardInterrupt))
+ throw_quit ("Quit");
+ else if (! PyErr_GivenExceptionMatches (ptype, gdbpy_gdberror_exc)
|| msg == NULL || *msg == '\0')
{
PyErr_Restore (ptype, pvalue, ptraceback);