diff options
author | Tom Tromey <tom@tromey.com> | 2018-12-25 12:38:01 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-12-27 13:34:39 -0700 |
commit | bc543c902f9891f732be68817e16ff379b69566e (patch) | |
tree | f7efae208fc1ffdb36ba601b33905652550523a6 /gdb/ChangeLog | |
parent | 6ef2312a177ebdfa841e82b515c144975073a501 (diff) | |
download | gdb-bc543c902f9891f732be68817e16ff379b69566e.zip gdb-bc543c902f9891f732be68817e16ff379b69566e.tar.gz gdb-bc543c902f9891f732be68817e16ff379b69566e.tar.bz2 |
Translate PyExc_KeyboardInterrupt to gdb "quit"
A while back I typed "info pretty-printers" with a large number of
printers installed, and I typed "q" to stop the pagination. I noticed
that gdb printed a Python exception in this case.
It seems to me that, instead, quitting pagination (or control-c'ing a
Python command generally) should be handled the same way that gdb
normally handles a quit.
This patch implements this idea by changing gdbpy_handle_exception to
treat PyExc_KeyboardInterrupt specially.
gdb/ChangeLog
2018-12-27 Tom Tromey <tom@tromey.com>
* python/py-utils.c (gdbpy_handle_exception): Translate
PyExc_KeyboardInterrupt to quit.
gdb/testsuite/ChangeLog
2018-12-27 Tom Tromey <tom@tromey.com>
* gdb.python/py-cmd.exp (test_python_inline_or_multiline): Add
pagination test.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r-- | gdb/ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 612f82f..eea0c21 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2018-12-27 Tom Tromey <tom@tromey.com> + * python/py-utils.c (gdbpy_handle_exception): Translate + PyExc_KeyboardInterrupt to quit. + +2018-12-27 Tom Tromey <tom@tromey.com> + * python/python-internal.h (gdbpy_print_stack_or_quit): Declare. * python/py-unwind.c (pyuw_sniffer): Use gdbpy_print_stack_or_quit. |