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

Tom Tromey
2026-03-04T19:30:50Z

>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:

Simon> My hypothesis is that CTF debug info is typically small enough and fast
Simon> enough to process that it's not worth it to bother with an intermediate
Simon> step before full symbols. But I will need help to see if this is true,
Simon> I'm not sure what representatively big C project I can build with CTF
Simon> debug info.

Is there even a (source-available) pure C program bigger than the kernel?

Simon> GDB is still able to load the resulting ELF, and there are about 150k
Simon> calls to ctf_add_type_cb. Before this patch, elfctf_build_psymtabs
Simon> takes anywhere between 300-350 ms. With this patch, it's around 400 ms.

This seems completely acceptable to me.

Simon> In order to access the symtabs, elfctf_build_symtabs installs the
Simon> expanded_symbols_functions quick_symbol_functions implementation, which
Simon> essentially searches in the existing symtabs. I am pretty sure this is
Simon> not 100% correct, because this would search unrelated symtabs, if for
Simon> instance the CTF debug info co-existed with DWARF info. But it's good
Simon> enough for a prototype.

In light of patch #7 this paragraph is obsolete.

Tom