aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-01-23 18:58:33 +0000
committerPedro Alves <palves@redhat.com>2019-01-23 19:05:50 +0000
commit694c6bf5425024a8654a5541dec88e4dd6ddafb5 (patch)
tree41d60d864814e18ddffe9477d443d7edd1f85d2a /gdb/infrun.c
parent4c41382ac101f10071f92074bab7c33242ef5b15 (diff)
downloadgdb-694c6bf5425024a8654a5541dec88e4dd6ddafb5.zip
gdb-694c6bf5425024a8654a5541dec88e4dd6ddafb5.tar.gz
gdb-694c6bf5425024a8654a5541dec88e4dd6ddafb5.tar.bz2
Remove make_bpstat_clear_actions_cleanup
This removes make_bpstat_clear_actions_cleanup, replacing it with uses of scope_exit. gdb/ChangeLog: 2019-01-23 Tom Tromey <tom@tromey.com> Andrew Burgess <andrew.burgess@embecosm.com> Pedro Alves <palves@redhat.com> * infrun.c (fetch_inferior_event): Use scope_exit. * utils.h (make_bpstat_clear_actions_cleanup): Don't declare. * top.c (execute_command): Use scope_exit. * breakpoint.c (bpstat_do_actions): Use scope_exit. * utils.c (do_bpstat_clear_actions_cleanup) (make_bpstat_clear_actions_cleanup): Remove.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 065fbf0..76dedd2 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3745,8 +3745,8 @@ fetch_inferior_event (void *client_data)
/* Get executed before make_cleanup_restore_current_thread above to apply
still for the thread which has thrown the exception. */
- struct cleanup *ts_old_chain = make_bpstat_clear_actions_cleanup ();
-
+ auto defer_bpstat_clear
+ = make_scope_exit (bpstat_clear_actions);
auto defer_delete_threads
= make_scope_exit (delete_just_stopped_threads_infrun_breakpoints);
@@ -3802,7 +3802,7 @@ fetch_inferior_event (void *client_data)
}
defer_delete_threads.release ();
- discard_cleanups (ts_old_chain);
+ defer_bpstat_clear.release ();
/* No error, don't finish the thread states yet. */
finish_state.release ();