]> 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, 19 May 2025 13:12:37 +0000 (14:12 +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 0b8728799613ca00806b2aa1008418c83654af9e..119bd1510340a926a73436819838c58d54b48a83 100644 (file)
@@ -7069,8 +7069,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