Throw a "quit" on a KeyboardException in py-framefilter.c
authorTom Tromey <tom@tromey.com>
Tue, 25 Apr 2017 03:47:59 +0000 (21:47 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 27 Mar 2018 03:57:12 +0000 (21:57 -0600)
commit4ca59a9f3616ba324952632233acc657fffa8be1
treecc109167eec74ae3047bcf8b0389be3089da8703
parent92256134f3e5557dcc321c63c48e8175ea90ca27
Throw a "quit" on a KeyboardException in py-framefilter.c

If a C-c comes while the Python code for a frame filter is running, it
will be turned into a Python KeyboardException.  It seems good for
this to be treated like a GDB quit, so this patch changes
py-framefilter.c to notice this situation and call throw_quit in this
case.

gdb/ChangeLog
2018-03-26  Tom Tromey  <tom@tromey.com>

* python/py-framefilter.c (throw_quit_or_print_exception): New
function.
(gdbpy_apply_frame_filter): Use it.

gdb/testsuite/ChangeLog
2018-03-26  Tom Tromey  <tom@tromey.com>

* gdb.python/py-framefilter.exp: Add test for KeyboardInterrupt.
* gdb.python/py-framefilter.py (name_error): New global.
(ErrorInName.function): Use name_error.
gdb/ChangeLog
gdb/python/py-framefilter.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-framefilter.exp
gdb/testsuite/gdb.python/py-framefilter.py
This page took 0.025142 seconds and 4 git commands to generate.