binutils-gdb/gdb/testsuite/gdb.python
Tom Tromey bc543c902f 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.
2018-12-27 13:34:39 -07:00
..
amd64-py-framefilter-invalidarg.S
lib-types.cc
lib-types.exp
py-arch.c
py-arch.exp
py-as-string.c
py-as-string.exp
py-bad-printers.c
py-bad-printers.exp
py-bad-printers.py
py-block.c
py-block.exp
py-breakpoint-create-fail.c
py-breakpoint-create-fail.exp
py-breakpoint-create-fail.py
py-breakpoint.c
py-breakpoint.exp Fix Python gdb.Breakpoint.location crash 2018-10-06 22:17:45 -06:00
py-caller-is.c
py-caller-is.exp
py-cmd.c
py-cmd.exp Translate PyExc_KeyboardInterrupt to gdb "quit" 2018-12-27 13:34:39 -07:00
py-completion.exp
py-completion.py
py-error.exp
py-error.py
py-events-shlib.c
py-events.c
py-events.exp
py-events.py
py-evsignal.exp
py-evthreads.c
py-evthreads.exp
py-explore-cc.exp
py-explore.c
py-explore.cc
py-explore.exp
py-finish-breakpoint2.cc
py-finish-breakpoint2.exp
py-finish-breakpoint2.py
py-finish-breakpoint.c
py-finish-breakpoint.exp
py-finish-breakpoint.py
py-frame-args.c
py-frame-args.exp
py-frame-args.py
py-frame-inline.c
py-frame-inline.exp
py-frame.c
py-frame.exp
py-framefilter-gdb.py.in
py-framefilter-invalidarg-gdb.py.in
py-framefilter-invalidarg.exp
py-framefilter-invalidarg.py
py-framefilter-mi.c
py-framefilter-mi.exp MI: Fix printing of frame architecture with Python frame filters enabled 2018-08-27 17:12:41 -04:00
py-framefilter.c
py-framefilter.exp Throw a "quit" on a KeyboardException in py-framefilter.c 2018-03-26 21:57:12 -06:00
py-framefilter.py Throw a "quit" on a KeyboardException in py-framefilter.c 2018-03-26 21:57:12 -06:00
py-function.exp
py-inferior.c
py-inferior.exp Add Inferior.architecture method 2018-10-06 23:20:55 -06:00
py-infthread.c
py-infthread.exp
py-lazy-string.c
py-lazy-string.exp
py-linetable.c
py-linetable.exp
py-linetable.S
py-lookup-type.exp
py-mi-events-gdb.py
py-mi-events.c
py-mi-events.exp
py-mi-objfile-gdb.py
py-mi-objfile.c
py-mi-objfile.exp
py-mi-var-info-path-expression.c Fix segfault when invoking -var-info-path-expression on a dynamic varobj 2018-07-31 10:13:41 -04:00
py-mi-var-info-path-expression.exp Fix segfault when invoking -var-info-path-expression on a dynamic varobj 2018-07-31 10:13:41 -04:00
py-mi-var-info-path-expression.py Fix segfault when invoking -var-info-path-expression on a dynamic varobj 2018-07-31 10:13:41 -04:00
py-mi.exp
py-objfile-script-gdb.py
py-objfile-script.c
py-objfile-script.exp
py-objfile.c
py-objfile.exp python: Provide textual representation for Inferior and Objfile 2018-09-13 11:54:38 -04:00
py-parameter.exp Allow setting a parameter to raise gdb.GdbError 2018-09-23 23:15:12 -06:00
py-pp-integral.c
py-pp-integral.exp
py-pp-integral.py
py-pp-maint.c
py-pp-maint.exp
py-pp-maint.py
py-pp-re-notag.c
py-pp-re-notag.exp
py-pp-re-notag.py
py-pp-registration.c
py-pp-registration.exp
py-pp-registration.py
py-prettyprint.c Allow a pretty-printer without a to_string method 2018-09-08 20:49:15 -06:00
py-prettyprint.exp Make py-prettyprint.exp test names unique 2018-09-08 21:47:53 -06:00
py-prettyprint.py Allow a pretty-printer without a to_string method 2018-09-08 20:49:15 -06:00
py-progspace.c
py-progspace.exp python: Add Progspace.objfiles method 2018-09-13 15:42:12 -04:00
py-prompt.c
py-prompt.exp
py-rbreak-func2.c
py-rbreak.c
py-rbreak.exp [gdb/testsuite] Fix regexp in py-rbreak.exp 2018-08-04 11:40:18 +02:00
py-record-btrace-threads.c
py-record-btrace-threads.exp
py-record-btrace.c
py-record-btrace.exp
py-record-full.c
py-record-full.exp
py-recurse-unwind.c
py-recurse-unwind.exp
py-recurse-unwind.py
py-rvalue-ref-value-cc.cc
py-rvalue-ref-value-cc.exp
py-section-script.c
py-section-script.exp Clean up "Reading symbols" output 2018-10-04 13:40:10 -06:00
py-section-script.py
py-shared-sl.c
py-shared.c
py-shared.exp
py-strfns.c
py-strfns.exp
py-symbol.c
py-symbol.exp
py-symtab.exp python: Provide textual representation for Inferior and Objfile 2018-09-13 11:54:38 -04:00
py-sync-interp.c
py-sync-interp.exp
py-template.cc
py-template.exp Check for negative argument in Type.template_argument 2018-09-23 23:15:12 -06:00
py-thrhandle.c
py-thrhandle.exp
py-type.c Expose type alignment on gdb.Type 2018-04-30 11:25:31 -06:00
py-type.exp Expose type alignment on gdb.Type 2018-04-30 11:25:31 -06:00
py-typeprint.cc
py-typeprint.exp
py-typeprint.py
py-unwind-maint.c
py-unwind-maint.exp
py-unwind-maint.py
py-unwind.c
py-unwind.exp
py-unwind.py
py-value-cc.cc
py-value-cc.exp
py-value.c
py-value.exp Allow conversion of pointers to Python int 2018-09-23 23:15:12 -06:00
py-xmethods.cc
py-xmethods.exp
py-xmethods.py
python-1.c
python.c
python.exp Make command-repeat work after gdb.execute 2018-11-21 17:06:05 +00:00
source1
source2.py