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

simon.marchi
2026-02-03T06:55:57Z

The CTF debug info reader is the last user of psymtabs. This seriies
changes the CTF reader to no longer create psymtabs, but instead create
full symtabs from the start. My hypothesis is that CTF debug info is
typically small enough and quick enough to process that we don't need an
intermediate step before the full symtabs.

This is an RFC, because I would like to collect comments (especially
from the CTF experts) on whether the startup time remains acceptable,
even for large programs. I also think that my use of
expanded_symbols_functions in the last patch is not quite right, I'll
need to look into that further.

Simon Marchi (8):
gdb/ctf: add debug logging in ctfread.c
gdb/ctf: add unique_ptr types
gdb/ctf: editorial renames
gdb/ctf: use ctf_per_objfile in ctf_archive_iter_psymtab_data and
ctf_context
gdb/ctf: check return value of ctf_type_align
gdb/ctf: add scoped_time_it in elfctf_build_psymtabs
gdb/ctf: don't use psymtabs, create symtabs directly
gdb: remove psymtab.{c,h}

gdb/Makefile.in | 2 -
gdb/NEWS | 4 +
gdb/ctfread.c | 691 ++++++++-----------
gdb/ctfread.h | 2 +-
gdb/doc/gdb.texinfo | 7 +
gdb/elfread.c | 8 +-
gdb/psymtab.c | 1575 -------------------------------------------
gdb/psymtab.h | 691 -------------------
8 files changed, 284 insertions(+), 2696 deletions(-)
delete mode 100644 gdb/psymtab.c
delete mode 100644 gdb/psymtab.h

base-commit: b11507b3dcc451e22ee29c89f386fab62b4e5b44
--
2.52.0