Re: [RFC PATCH 0/8] Make CTF reader build full symtabs, get rid of psymtab

Simon Marchi
2026-02-12T18:47:50Z

On 2/12/26 12:58 PM, Tom Tromey wrote:
> Simon> This is an RFC, because I would like to collect comments (especially
> Simon> from the CTF experts) on whether the startup time remains acceptable,
> Simon> even for large programs.
>
> I'm not a CTF expert but I read through the patches and it seems
> basically fine to me.
>
> Simon> I also think that my use of
> Simon> expanded_symbols_functions in the last patch is not quite right, I'll
> Simon> need to look into that further.
>
> We've since discussed this in a different thread, where we contemplated
> putting the compunit_symtabs elsewhere.

My plan is indeed to make expanded_symbols_functions to hold a list of
compunit symtabs to search. You can have a sneak peek here if you want:

https://review.lttng.org/c/binutils-gdb/+/16557

This way, you can have two symbol providers using
expanded_symbols_functions (say, jit and ctf) that both push an
expanded_symbols_functions "quick" object. Each object says which
compunit_symtabs to search.

> The "bad" scenarios (which I think are just performance and not
> correctness -related) only seem possible if "always-read-ctf" is set.
> Which presumably few people really do.

As I stated in that other message (I can't find it now), I think it might
have to do with correctness if we consider the ordering of the symbol
providers (quick symbol functions) represents the priority in the
search. Having expanded_symbols_functions search all compunit_symtabs
would mess that up.

Simon