From: Pedro Alves Date: Mon, 10 Mar 2025 17:30:52 +0000 (+0000) Subject: infrun: Remove unnecessary currently_stepping call X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6d2c1099cdebdea279bb460f54805206e674e50;p=thirdparty%2Fbinutils-gdb.git infrun: Remove unnecessary currently_stepping call 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 --- diff --git a/gdb/infrun.c b/gdb/infrun.c index 2e02642c52a..0e501d8515f 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -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