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

Andrew Burgess
2026-03-31T15:45:44Z

Tom de Vries <tdevries@suse.de> writes:

> On 3/19/26 7:03 PM, Tom de Vries wrote:
>>> I think that it is worth at least investigating altering
>>> step_start_function to track the actual function, including inline
>>> functions, this seems like it would be a better fix.  But if not then at
>>> least we'll understand why it's not the right solution.
>>
>> Hi,
>>
>> just a small update on this.
>>
>> I've given this a try ( https://github.com/vries/gdb/tree/gdb/fix-
>> missing-print-frame-when-stepping-out-of-function-2 ) and ran into
>> trouble with just one test-case, gdb.opt/inline-cmds.exp ).
>>
>> Basically, with current gdb we have:
>> ...
>> 63      x = 7;
>> (gdb) s
>> 64      y = 8; /* set mi break here */
>> (gdb) s
>> 66      result = func1 ();
>> (gdb)
>> ...
>> and with the patch series posted above:
>> ...
>> 63      x = 7;
>> (gdb) s
>> 64      y = 8; /* set mi break here */
>> (gdb) s
>> main () at /data/vries/gdb/leap-16-0/build/../../src/gdb/testsuite/
>> gdb.opt/inline-cmds.c:66
>> 66      result = func1 ();
>> (gdb)
>> ...
>>
>> There is some code somewhere that allows entry into an inline function
>> to happen in two steps, even if the pc stays the same inbetween, and
>> that code seems to interact with the solution in the patch series.
>>
>> I'll take a further look tomorrow.
>
> Hi Andrew,
>
> this estimate turned out to be somewhat optimistic, but I've taken a
> look today, and submitted a v2 with the RFC tag (
> https://sourceware.org/pipermail/gdb-patches/2026-March/226269.html ),
> containing the analysis of the regression mentioned above.

I'll take a look.

Thanks,
Andrew