Re: [PATCH 12/24] gdb: make solib-svr4 not use so_list internally

Simon Marchi
2023-10-19T14:50:34Z

On 10/19/23 07:08, Lancelot SIX wrote:
> Hi Simon,
>
>> @@ -1050,48 +1034,25 @@ library_list_start_library (struct gdb_xml_parser *parser,
>> ULONGEST *l_ldp
>> = (ULONGEST *) xml_find_attribute (attributes, "l_ld")->value.get ();
>>
>> - so_list *new_elem = new so_list;
>> - lm_info_svr4 *li = new lm_info_svr4;
>> - new_elem->lm_info = li;
>> + lm_info_svr4_up li = gdb::make_unique<lm_info_svr4> ();
>> li->lm_addr = *lmp;
>> li->l_addr_inferior = *l_addrp;
>> li->l_ld = *l_ldp;
>
> Just a thought for future changes to continue the c++-ification, adding
> a proper ctor (or ctors) to lm_info_svr4 would probably make things
> cleaner.
>
> Otherwise, things looks reasonable to me.

Ok, I'll look into doing a patch on top instead of inserting one in the
middle, since I don't want to deal with conflicts again.

Simon