Re: [RFC PATCH 7/8] gdb/ctf: don't use psymtabs, create symtabs directly

Tom Tromey <[email protected]> Tue, 03 Feb 2026 16:04:12 -0700
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
>>>>> "Jan" == Jan Vrany <[email protected]> writes:

Jan> In case the search fails, yes. Otherwise the first implementation that
Jan> finds something wins, the others are not tried. It looks to me this can
Jan> be easily solved by adding each implementation only once.

It depends on which method is called.
For instance linespec generally tries to collect all matches, whereas
type lookups tend to stop with the first (non-stub) type.

Jan> As a side note, when debugging quick symbols I noticed that very often
Jan> the same thing is searched for in quick succession. 

Yeah.  There's a lot of old & ugly code in there.

There's a cache in symtab.c to try to speed this up.

Jan> In "Python JIT API" series, I allow to add symbols any objfile, even
Jan> the one with existing DWARF. To make this work, I push expanded_symbols_functions
Jan> to the end of qf list. Whether this is a good or bad idea, I do not know - the reasonĀ 
Jan> for this was to support an arguably extreme usecase where dynamic code is generatedĀ 
Jan> into statically allocated buffer or section. I'm happy to reintroduce these checks (and
Jan> therefore not supporting this usecase) if it feels "safer".

I didn't look at the series yet but I think this approach will regress
some recent performance improvements.

Tom