Re: [PATCH] [gdb] Fix missing print frame when stepping out of function

Tom de Vries
2026-03-31T13:33:06Z

On 3/18/26 3:29 PM, Andrew Burgess wrote:
>> void
>> set_step_info (thread_info *tp, const frame_info_ptr &frame,
>> - struct symtab_and_line sal)
>> + struct symtab_and_line sal, bool refresh_p)
>> {
>> /* This can be removed once this function no longer implicitly relies on the
>> inferior_ptid value. */
>> gdb_assert (inferior_ptid == tp->ptid);
>>
>> + if (refresh_p
>> + && tp->control.step_frame_id != null_frame_id
> Unfortunately, this doesn't work. Comparing frame_ids ends up in
> frame_id::operator== in frame.c, which always returns false if either
> frame-id is null_frame_id. As a result, the != above always returns
> true.
>

I see, thanks for pointing that out.

> I think this is why you ended up having to add the refresh_p argument
> maybe?

To follow up on this (even though we're exploring a different direction
atm), AFAIR I didn't need either of the two things you mention here
(frame comparison and refresh_p) to make the patch work, but I added
them with the intention of making the change more robust.

Thanks,
- Tom