This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 7/9] Change solib-aix.c to use type-safe registry
On 2019-07-10 4:33 p.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
>
>>> +typedef gdb::optional<std::vector<lm_info_aix>> library_list_type;
>
> Simon> Hmm, I find that hiding the gdb::optional behind a typedef can be a bit
> Simon> confusing. It's easy to forget that it's an optional if it's not "in your
> Simon> face". I think it would help to be explicit and spell out gdb::optional
> Simon> where needed.
>
> Makes sense, I've removed the typedef.
>
> I made the other changes you mentioned, except...
>
>>> - for (ix = 1; VEC_iterate (lm_info_aix_p, library_list, ix, info); ix++)
>>> + for (ix = 1; ix < library_list->size (); ix++)
>
> Simon> This could be:
>
> Simon> for (lm_info_aix &info : *library_list)
>
> This isn't quite the same, because the current loop starts at index 1,
> not 0. So, I didn't make this change.
Ah good point, you are right, sorry about that!