binutils-gdb/gdb/python
Tom Tromey a3a6aef409 Fix possible exception leak in python.c
In the Python code, gdb exceptions may not leak into the Python core.
execute_gdb_command was calling bpstat_do_actions outside of a
TRY/CATCH; which seemed risky.  I don't have a test case for this, but
if bpstat_do_actions could ever throw, it could crash gdb.

This patch introduces a new scope in order to preserve the current
semantics, so it is looks a bit bigger than it really is.

Tested on x86-64 Fedora 28.

gdb/ChangeLog
2018-09-07  Tom Tromey  <tom@tromey.com>

	* python/python.c (execute_gdb_command): Call bpstat_do_actions
	inside the TRY.
2018-09-14 21:56:41 -06:00
..
lib/gdb
py-all-events.def
py-arch.c
py-auto-load.c
py-block.c
py-bpevent.c gdb/python: Use copy-initialization more when possible 2018-08-24 22:57:16 +01:00
py-breakpoint.c
py-cmd.c
py-continueevent.c gdb/python: Use copy-initialization more when possible 2018-08-24 22:57:16 +01:00
py-event-types.def
py-event.c
py-event.h
py-events.h
py-evtregistry.c
py-evts.c
py-exitedevent.c gdb/python: Use copy-initialization more when possible 2018-08-24 22:57:16 +01:00
py-finishbreakpoint.c
py-frame.c
py-framefilter.c MI: Fix printing of frame architecture with Python frame filters enabled 2018-08-27 17:12:41 -04:00
py-function.c
py-gdb-readline.c
py-inferior.c Make infpy_thread_from_thread_handle static 2018-09-13 16:23:52 -06:00
py-infevents.c gdb/python: Use copy-initialization more when possible 2018-08-24 22:57:16 +01:00
py-infthread.c
py-instruction.c
py-instruction.h
py-lazy-string.c
py-linetable.c
py-newobjfileevent.c gdb/python: Use copy-initialization more when possible 2018-08-24 22:57:16 +01:00
py-objfile.c python: Provide textual representation for Inferior and Objfile 2018-09-13 11:54:38 -04:00
py-param.c
py-prettyprint.c python: Make two functions return gdbpy_ref<> 2018-09-09 08:13:17 +01:00
py-progspace.c python: Add Progspace.objfiles method 2018-09-13 15:42:12 -04:00
py-record-btrace.c
py-record-btrace.h
py-record-full.c
py-record-full.h
py-record.c
py-record.h
py-ref.h
py-signalevent.c gdb/python: Use copy-initialization more when possible 2018-08-24 22:57:16 +01:00
py-stopevent.c
py-stopevent.h
py-symbol.c
py-symtab.c
py-threadevent.c Initialize variable in py_get_event_thread 2018-08-25 11:52:24 -04:00
py-type.c
py-unwind.c
py-utils.c
py-value.c
py-varobj.c
py-xmethods.c
python-config.py
python-internal.h python: Add Progspace.objfiles method 2018-09-13 15:42:12 -04:00
python.c Fix possible exception leak in python.c 2018-09-14 21:56:41 -06:00
python.h