[binutils-gdb] infrun: Remove unnecessary currently_stepping call

Pedro Alves via Gdb-cvs <[email protected]>
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f179fcdafb8f0f4611d288f371364502f9e82cfa

commit f179fcdafb8f0f4611d288f371364502f9e82cfa
Author: Pedro Alves <[email protected]>
Date:   Mon Mar 10 17:30:52 2025 +0000

    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.
    
    Approved-by: Kevin Buettner <[email protected]>
    Change-Id: I7b07bc62e8570333d2e4856d2e55ae6e58f8260c
    commit-id:0125e966

Diff:
---
 gdb/infrun.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gdb/infrun.c b/gdb/infrun.c
index 6ca2a505299..14fc56976e2 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.