diff options
author | Tom Tromey <tom@tromey.com> | 2016-11-07 16:03:10 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-01-10 19:13:40 -0700 |
commit | 6e7c365ee0ea2551f9f840b71081fdf759088b5e (patch) | |
tree | 197e286f475b9752b7ddbed8ee45d2ff26062cab /gdb | |
parent | 6ba0cd406511d3edbe643f5e599d79538febedc5 (diff) | |
download | gdb-6e7c365ee0ea2551f9f840b71081fdf759088b5e.zip gdb-6e7c365ee0ea2551f9f840b71081fdf759088b5e.tar.gz gdb-6e7c365ee0ea2551f9f840b71081fdf759088b5e.tar.bz2 |
Use gdbpy_enter in py-finishbreakpoint.c
Change py-finishbreakpoint.c to use gdbpy_enter.
2017-01-10 Tom Tromey <tom@tromey.com>
* python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
(bpfinishpy_handle_exit): Use gdbpy_enter.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/python/py-finishbreakpoint.c | 10 |
2 files changed, 7 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f02b235..ab19c41 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2017-01-10 Tom Tromey <tom@tromey.com> + * python/py-finishbreakpoint.c (bpfinishpy_handle_stop) + (bpfinishpy_handle_exit): Use gdbpy_enter. + +2017-01-10 Tom Tromey <tom@tromey.com> + * python/py-cmd.c (cmdpy_destroyer) (cmdpy_completer_handle_brkchars, cmdpy_completer): Use gdbpy_enter. diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c index da39d28..4e49ec7 100644 --- a/gdb/python/py-finishbreakpoint.c +++ b/gdb/python/py-finishbreakpoint.c @@ -392,13 +392,10 @@ bpfinishpy_detect_out_scope_cb (struct breakpoint *b, void *args) static void bpfinishpy_handle_stop (struct bpstats *bs, int print_frame) { - struct cleanup *cleanup = ensure_python_env (get_current_arch (), - current_language); + gdbpy_enter enter_py (get_current_arch (), current_language); iterate_over_breakpoints (bpfinishpy_detect_out_scope_cb, bs == NULL ? NULL : bs->breakpoint_at); - - do_cleanups (cleanup); } /* Attached to `exit' notifications, triggers all the necessary out of @@ -407,12 +404,9 @@ bpfinishpy_handle_stop (struct bpstats *bs, int print_frame) static void bpfinishpy_handle_exit (struct inferior *inf) { - struct cleanup *cleanup = ensure_python_env (target_gdbarch (), - current_language); + gdbpy_enter enter_py (target_gdbarch (), current_language); iterate_over_breakpoints (bpfinishpy_detect_out_scope_cb, NULL); - - do_cleanups (cleanup); } /* Initialize the Python finish breakpoint code. */ |