Re: [PATCH 1/2] gdb: use get_current_frame consistently in print_stop_location

Tom de Vries
2026-04-09T13:43:50Z

On 4/9/26 10:54 AM, Andrew Burgess wrote:
>> So I'm proposing a change to this patch (attached below, doesn't apply
>> to the first but to the second patch) that:
>> - introduces a variable print_frame
>> - assigns get_selected_frame (nullptr) to print_frame
>> - adds a comment explaining how print_frame relates to the stop frame
>> - uses print_frame everywhere in the function
>>
>> I tested the series in combination with the attached patch on
>> x86_64-linux, and found no regressions.
> Thanks for the great analysis, and explanation, I wasn't aware of this
> aspect of bpstat_print. Given this new information, I think your patch
> is the right solution.
>
> Approved-By: Andrew Burgess<aburgess@redhat.com>

Hi Andrew,

my initial idea here was that the patch I posted could be trivially
merged with the first patch, but upon attempting this I ended up
re-editing the series. I'm currently testing this, and will submit if
that goes ok.

The content of the patch series should be what you posted plus
aforementioned patch, the changes I made are merely refactoring.

Thanks,
- Tom