Re: [PATCH] gdb: replace msym_bunch with deque

Simon Marchi
2026-01-04T04:10:00Z

On 2026-01-03 18:24, Maciej W. Rozycki wrote:
> On Thu, 18 Dec 2025, Simon Marchi wrote:
>
>>> Simon> Indeed, I dug into that in the mean time. I'd like if someone with
>>> Simon> historical knowledge could fact-check me here.
>>>
>>> FWIW I suspect no such person exists.
>>
>> Given a lot of this is MIPS-specific, I was hoping that Maciej could be
>> able to help (adding in CC).
>
> I don't know offhand as it's stuff I haven't touched for ages now. I'll
> see what I can do. Also I can see you've pushed your change already, so I
> gather there's no rush. NB it was bad timing to get into this discussion
> as I had an emergency situation to handle and overall hectic time through
> recent weeks.
>
> Happy New Year for now!

Thanks for replying, hope all is well for you.

I pushed the patch because I convinced myself that the patch wouldn't
break the ECOFF-in-ELF case. Here is the relevant quote from my
previous message:

Ok, so I think that the consequence of my patch is that if you're
parsing ECOFF-in-ELF, then we'll allocate minimal symbols unnecessarily
in mdebugread's minimal_symbol_reader. They still won't get installed
because of the check in minimal_symbol_reader::install. They will get
freed when the minimal_symbol_reader gets destroyed. So that means
slightly higher memory usage for the duration of
elfmdebug_build_psymtabs, but no change in behavior. I can live with
that, so I'll go ahead and push the patch.

Of course, this is all based on my understanding, from the information I
gleaned here and there. It seems like not many people remember this era
nowadays :(.

What would help me, if you have time (no rush), is to tell me if we can
reasonably consider the code in mipsread.c (and mdebugread.c, which
seems related) to be obsolete and remove it.

Simon