Re: [PATCH 21/24] gdb: link so_list using intrusive_list

Simon Marchi
2023-10-17T19:38:44Z

On 10/17/23 15:14, Pedro Alves wrote:
> On 2023-10-10 21:40, Simon Marchi wrote:
>
>> diff --git a/gdb/solist.h b/gdb/solist.h
>> index 9320acb7fd3e..31b823a3a482 100644
>> --- a/gdb/solist.h
>> +++ b/gdb/solist.h
>> @@ -36,7 +36,7 @@ struct lm_info
>>
>> using lm_info_up = std::unique_ptr<lm_info>;
>>
>> -struct so_list
>> +struct so_list : intrusive_list_node<so_list>
>
> I noticed this in patch #24:
>
> > @@ -52,7 +52,7 @@ struct so_list : intrusive_list_node<so_list>
> > dynamic linker's tables in the inferior, and are initialized by
> > current_sos. */
> >
> > - struct so_list *next = nullptr; /* next structure in linked list */
> > + so *next = nullptr; /* next structure in linked list */
>
> Err, what "next" still doing there? :-) This patch should have deleted it.

Good find, fixed locally.

Simon