Re: [PATCHv2 11/16] gdb: remove reggroup_next and reggroup_prev

Simon Marchi via Gdb-patches
2022-04-06T14:23:30Z

>> diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
>> index b968947fa1c..acffc75238a 100644
>> --- a/gdb/tui/tui-regs.c
>> +++ b/gdb/tui/tui-regs.c
>> @@ -514,34 +514,48 @@ tui_data_item_window::rerender (WINDOW *handle, int field_width)
>> (void) wstandend (handle);
>> }
>>
>> -/* Helper for "tui reg next", wraps a call to REGGROUP_NEXT, but adds wrap
>> - around behaviour. Will never return nullptr. If CURRENT_GROUP is
>> - nullptr (e.g. if the tui register window has only just been displayed
>> - and has no current group selected), then the first register group will
>> - be returned. */
>> +/* Helper for "tui reg next", returns the next register group after
>> + CURRENT_GROUP in the register group list for GDBARCH, with wrap around
>> + behaviour.
>> +
>> + If CURRENT_GROUP is nullptr (e.g. if the tui register window has only
>> + just been displayed and has no current group selected) or the currently
>> + selected register group can't be found (e.g. if the architecture has
>> + changed since the register window was last updated), then the last
>> + register group will be returned. */
>
> last or next? This is for tui_reg_next.

Sorry I meant "last or first".