]> 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>
Mon, 9 Jun 2025 17:09:10 +0000 (18:09 +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.

Change-Id: I7b07bc62e8570333d2e4856d2e55ae6e58f8260c

gdb/infrun.c

index 2e02642c52a4201be2793dee1ce5a568f96bd664..0e501d8515f989e2078818e75a749f8e56233e60 100644 (file)
@@ -7068,8 +7068,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