]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
infrun: Remove unnecessary currently_stepping call
authorPedro Alves <pedro@palves.net>
Mon, 10 Mar 2025 17:30:52 +0000 (17:30 +0000)
committerPedro Alves <pedro@palves.net>
Thu, 2 Apr 2026 13:08:00 +0000 (14:08 +0100)
There's one unnecessary check for currently_stepping in
handle_signal_stop that can be removed.  It is unnecessary because
currently_stepping is only ever called if
ecs->event_thread->control.trap_expected is true, and then if it is
true, then currently_stepping always returns true too.

Approved-by: Kevin Buettner <kevinb@redhat.com>
Change-Id: I7b07bc62e8570333d2e4856d2e55ae6e58f8260c
commit-id:0125e966

gdb/infrun.c

index 6ca2a505299a2e9add97ebb8807386da6cb4738d..14fc56976e22bad2a2acfc9616757ff8b75e6da2 100644 (file)
@@ -7095,8 +7095,7 @@ handle_signal_stop (struct execution_control_state *ecs)
 
   if (ecs->event_thread->stop_signal () == GDB_SIGNAL_TRAP
       && ecs->event_thread->control.trap_expected
-      && gdbarch_single_step_through_delay_p (gdbarch)
-      && currently_stepping (ecs->event_thread))
+      && gdbarch_single_step_through_delay_p (gdbarch))
     {
       /* We're trying to step off a breakpoint.  Turns out that we're
         also on an instruction that needs to be stepped multiple