aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-01-23 18:58:31 +0000
committerPedro Alves <palves@redhat.com>2019-01-23 19:04:26 +0000
commit5419bdae559360a10044983b06c11a31de8d81f4 (patch)
tree9347b273532e24024e5389a44c46f3dea4d76c52 /gdb/infcmd.c
parente587ef421eb7e009c6a69da55c269e9df45093e4 (diff)
downloadfsf-binutils-gdb-5419bdae559360a10044983b06c11a31de8d81f4.zip
fsf-binutils-gdb-5419bdae559360a10044983b06c11a31de8d81f4.tar.gz
fsf-binutils-gdb-5419bdae559360a10044983b06c11a31de8d81f4.tar.bz2
Replace delete_longjmp_breakpoint_cleanup with a forward_scope_exit type
This removes delete_longjmp_breakpoint_cleanup in favor of forward_scope_exit. gdb/ChangeLog: 2019-01-23 Tom Tromey <tom@tromey.com> Andrew Burgess <andrew.burgess@embecosm.com> Pedro Alves <palves@redhat.com> * breakpoint.c (until_break_command): Use delete_longjmp_breakpoint_cleanup class. * infcmd.c (delete_longjmp_breakpoint_cleanup): Remove function. (until_next_command): Use delete_longjmp_breakpoint_cleanup class. * inferior.h: Include forward-scope-exit.h. (delete_longjmp_breakpoint_cleanup): Replace function declaration with FORWARD_SCOPE_EXIT type.
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 3c3add8..fafb7e2 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -947,13 +947,6 @@ nexti_command (const char *count_string, int from_tty)
step_1 (1, 1, count_string);
}
-void
-delete_longjmp_breakpoint_cleanup (void *arg)
-{
- int thread = * (int *) arg;
- delete_longjmp_breakpoint (thread);
-}
-
/* Data for the FSM that manages the step/next/stepi/nexti
commands. */
@@ -1517,7 +1510,6 @@ until_next_command (int from_tty)
struct symtab_and_line sal;
struct thread_info *tp = inferior_thread ();
int thread = tp->global_num;
- struct cleanup *old_chain;
struct until_next_fsm *sm;
clear_proceed_status (0);
@@ -1556,11 +1548,11 @@ until_next_command (int from_tty)
tp->control.step_over_calls = STEP_OVER_ALL;
set_longjmp_breakpoint (tp, get_frame_id (frame));
- old_chain = make_cleanup (delete_longjmp_breakpoint_cleanup, &thread);
+ delete_longjmp_breakpoint_cleanup lj_deleter (thread);
sm = new_until_next_fsm (command_interp (), tp->global_num);
tp->thread_fsm = &sm->thread_fsm;
- discard_cleanups (old_chain);
+ lj_deleter.release ();
proceed ((CORE_ADDR) -1, GDB_SIGNAL_DEFAULT);
}