Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb] Fix missing print frame when stepping out of function
Date: Fri, 3 Apr 2026 17:17:51 +0200	[thread overview]
Message-ID: <4d8be264-7519-49b4-aed3-d7b530c0f50a@suse.de> (raw)
In-Reply-To: <20260312120211.3806600-1-tdevries@suse.de>

On 3/12/26 1:02 PM, Tom de Vries wrote:
> No longer refreshing the stepping info in the "stepped to a different frame,
> but it's not the start of a statement" case does fix the problem.
> 
> But the refreshing is needed to be able to handle stepping out of say function
> f1 into function f2 and immediately stepping back into f1 again.  If we don't
> refresh in between, it looks like we stayed in f1.

FWIW, in order to test this theory, I did:
...
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 2e53d2a6c30..ec2697dd437 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -8303,6 +8303,7 @@ process_event_stop_test (struct 
execution_control_state *ecs)
  	  stop_pc_sal.line = 0;
  	  infrun_debug_printf ("stepped to a different frame, but "
  			       "it's not the start of a statement");
+	  refresh_step_info = false;
  	}
      }

...
and ran into a failure here:
...
(gdb) PASS: gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp: continue to 
breakpoint: bar
step^M
0x0000000000401116 in foo ()^M
(gdb) FAIL: gdb.dwarf2/dw2-step-out-of-function-no-stmt.exp: step
...

I haven't looked into exactly why this is failing, but the apparently 
the refresh_step_info does have a function here.

Thanks,
- Tom

      parent reply	other threads:[~2026-04-03 15:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12 12:02 Tom de Vries
2026-03-18 14:29 ` Andrew Burgess
2026-03-19 18:03   ` Tom de Vries
2026-03-31 13:27     ` Tom de Vries
2026-03-31 15:44       ` Andrew Burgess
2026-03-31 13:32   ` Tom de Vries
2026-04-03 15:17 ` Tom de Vries [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4d8be264-7519-49b4-aed3-d7b530c0f50a@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox