Re: [PATCHv2 00/16] Default register groups, and general related cleanup

Andrew Burgess via Gdb-patches
2022-04-07T15:17:25Z

Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:

> On 2022-04-06 08:04, Andrew Burgess via Gdb-patches wrote:
>> This work started with this thread:
>>
>> https://sourceware.org/pipermail/gdb-patches/2022-March/187071.html
>>
>> In which it was discovered that the ppc targets don't add the default
>> register groups during gdbarch initialisation.
>>
>> I've run into this problem before, and every time I wonder why the
>> default register groups aren't added by default in all cases.
>>
>> So, looked at doing just that.
>>
>> But the register group management code was feeling a bit crusty, so I
>> thought I'd clean it up.
>>
>> Then I hit some bugs, which I figured I'd fix.
>>
>> Anyway, patch #9 is what I set out to do. Everything else is me
>> trying to improve the register group handling code.
>>
>> Changes in v2:
>>
>> - Rebased onto current master, the changes I make to
>> gdb.tui/regs.exp in one of the patches needed some small
>> adjustments given recent tui changes,
>>
>> - Updated patch #11 based on Lancelot's feedback, this looks much
>> better now.
>
> Other than the small nits I pointed out, this all LGTM. I left a
> comment about maybe using intrusive_list instead of std::vector, if that
> could simplify things. But if so, it can be done later / after this
> series is merged.

Thanks for the review. I addressed the feedback, but left the
std::vector / intrusive_list stuff for now. This certainly isn't hot
path code, and the vector version just seemed simpler (to me). But if
you're keen to change it, then I'm not going to object.

Thanks,
Andrew