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.
This commit is contained in:
parent
6ba0cd4065
commit
6e7c365ee0
2 changed files with 7 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2017-01-10 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* python/py-cmd.c (cmdpy_destroyer)
|
* python/py-cmd.c (cmdpy_destroyer)
|
||||||
|
|
|
@ -392,13 +392,10 @@ bpfinishpy_detect_out_scope_cb (struct breakpoint *b, void *args)
|
||||||
static void
|
static void
|
||||||
bpfinishpy_handle_stop (struct bpstats *bs, int print_frame)
|
bpfinishpy_handle_stop (struct bpstats *bs, int print_frame)
|
||||||
{
|
{
|
||||||
struct cleanup *cleanup = ensure_python_env (get_current_arch (),
|
gdbpy_enter enter_py (get_current_arch (), current_language);
|
||||||
current_language);
|
|
||||||
|
|
||||||
iterate_over_breakpoints (bpfinishpy_detect_out_scope_cb,
|
iterate_over_breakpoints (bpfinishpy_detect_out_scope_cb,
|
||||||
bs == NULL ? NULL : bs->breakpoint_at);
|
bs == NULL ? NULL : bs->breakpoint_at);
|
||||||
|
|
||||||
do_cleanups (cleanup);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Attached to `exit' notifications, triggers all the necessary out of
|
/* 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
|
static void
|
||||||
bpfinishpy_handle_exit (struct inferior *inf)
|
bpfinishpy_handle_exit (struct inferior *inf)
|
||||||
{
|
{
|
||||||
struct cleanup *cleanup = ensure_python_env (target_gdbarch (),
|
gdbpy_enter enter_py (target_gdbarch (), current_language);
|
||||||
current_language);
|
|
||||||
|
|
||||||
iterate_over_breakpoints (bpfinishpy_detect_out_scope_cb, NULL);
|
iterate_over_breakpoints (bpfinishpy_detect_out_scope_cb, NULL);
|
||||||
|
|
||||||
do_cleanups (cleanup);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize the Python finish breakpoint code. */
|
/* Initialize the Python finish breakpoint code. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue