Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC PATCH 0/8] Make CTF reader build full symtabs, get rid of psymtab
@ 2026-02-03  6:45 simon.marchi
  2026-02-03  6:45 ` [RFC PATCH 1/8] gdb/ctf: add debug logging in ctfread.c simon.marchi
                   ` (9 more replies)
  0 siblings, 10 replies; 53+ messages in thread
From: simon.marchi @ 2026-02-03  6:45 UTC (permalink / raw)
  To: gdb-patches; +Cc: Nick Alcock, Weimin Pan, Simon Marchi

From: Simon Marchi <simon.marchi@polymtl.ca>

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


^ permalink raw reply	[flat|nested] 53+ messages in thread
* Re: [RFC PATCH 7/8] gdb/ctf: don't use psymtabs, create symtabs directly
@ 2026-02-03 13:00 Jan Vrany
  0 siblings, 0 replies; 53+ messages in thread
From: Jan Vrany @ 2026-02-03 13:00 UTC (permalink / raw)


On Tue, 2026-02-03 at 07:00 +0000, simon.marchi wrote:
> https://inbox.sourceware.org/gdb-patches/20260203065435.3092465-8-simon.marchi@polymtl.ca/
> 
> 
> In order to access the symtabs, elfctf_build_symtabs installs the
> expanded_symbols_functions quick_symbol_functions implementation, which
> essentially searches in the existing symtabs.  I am pretty sure this is
> not 100% correct, because this would search unrelated symtabs, if for
> instance the CTF debug info co-existed with DWARF info.  But it's good
> enough for a prototype.

True, but does that matter? Should that matter?

Also it seems to me that this version does not allow for both CTF and
DWARF in single objfile: 

(from patch "gdb/ctf: don't use psymtabs, create symtabs directly")

   /* Read the CTF section only if there is no DWARF info.  */
   if (!always_read_ctf && !has_dwarf2 && ei.ctfsect)
-    {
-      elfctf_build_psymtabs (objfile);
-    }
+    elfctf_build_symtabs (objfile);
 
   /* Copy relocations are used by some ABIs using the ELF format, so
      set the objfile flag indicating this fact.  */

Thanks, 

Jan


^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2026-03-10 17:10 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-03  6:45 [RFC PATCH 0/8] Make CTF reader build full symtabs, get rid of psymtab simon.marchi
2026-02-03  6:45 ` [RFC PATCH 1/8] gdb/ctf: add debug logging in ctfread.c simon.marchi
2026-02-03 12:40   ` Eli Zaretskii
2026-02-03 16:21     ` Simon Marchi
2026-02-03 16:37       ` Eli Zaretskii
2026-02-03 20:39         ` Simon Marchi
2026-02-03  6:45 ` [RFC PATCH 2/8] gdb/ctf: add unique_ptr types simon.marchi
2026-02-03  6:45 ` [RFC PATCH 3/8] gdb/ctf: editorial renames simon.marchi
2026-02-03  6:45 ` [RFC PATCH 4/8] gdb/ctf: use ctf_per_objfile in ctf_archive_iter_psymtab_data and ctf_context simon.marchi
2026-02-12 17:44   ` Tom Tromey
2026-02-12 18:35     ` Simon Marchi
2026-02-03  6:45 ` [RFC PATCH 5/8] gdb/ctf: check return value of ctf_type_align simon.marchi
2026-02-12 17:49   ` Tom Tromey
2026-02-12 18:37     ` Simon Marchi
2026-02-03  6:45 ` [RFC PATCH 6/8] gdb/ctf: add scoped_time_it in elfctf_build_psymtabs simon.marchi
2026-02-03  6:45 ` [RFC PATCH 7/8] gdb/ctf: don't use psymtabs, create symtabs directly simon.marchi
2026-02-12 17:54   ` Tom Tromey
2026-02-03  6:45 ` [RFC PATCH 8/8] gdb: remove psymtab.{c,h} simon.marchi
2026-02-12 17:58 ` [RFC PATCH 0/8] Make CTF reader build full symtabs, get rid of psymtab Tom Tromey
2026-02-12 18:47   ` Simon Marchi
2026-02-17 19:50 ` [PATCH v2 0/9] " simon.marchi
2026-02-17 19:50   ` [PATCH v2 1/9] gdb/ctf: add debug logging in ctfread.c simon.marchi
2026-02-17 19:50   ` [PATCH v2 2/9] gdb/ctf: add unique_ptr types simon.marchi
2026-02-17 19:50   ` [PATCH v2 3/9] gdb/ctf: editorial renames simon.marchi
2026-02-17 19:50   ` [PATCH v2 4/9] gdb/ctf: use ctf_per_objfile in ctf_archive_iter_psymtab_data and ctf_context simon.marchi
2026-02-17 19:50   ` [PATCH v2 5/9] gdb/ctf: check return value of ctf_type_align simon.marchi
2026-02-17 19:50   ` [PATCH v2 6/9] gdb/ctf: add scoped_time_it in elfctf_build_psymtabs simon.marchi
2026-02-17 19:50   ` [PATCH v2 7/9] gdb: make expanded_symbols_functions hold compunit symtabs simon.marchi
2026-02-17 19:50   ` [PATCH v2 8/9] gdb/ctf: don't use psymtabs, create symtabs directly simon.marchi
2026-02-17 19:50   ` [PATCH v2 9/9] gdb: remove psymtab.{c,h} simon.marchi
2026-02-28  3:51   ` [PATCH v3 0/9] Make CTF reader build full symtabs, get rid of psymtab Simon Marchi
2026-02-28  3:51     ` [PATCH v3 1/9] gdb/ctf: add debug logging in ctfread.c Simon Marchi
2026-02-28 10:12       ` Eli Zaretskii
2026-02-28 16:23         ` Simon Marchi
2026-02-28  3:51     ` [PATCH v3 2/9] gdb/ctf: add unique_ptr types Simon Marchi
2026-02-28  3:51     ` [PATCH v3 3/9] gdb/ctf: editorial renames Simon Marchi
2026-02-28  3:51     ` [PATCH v3 4/9] gdb/ctf: use ctf_per_objfile in ctf_archive_iter_psymtab_data and ctf_context Simon Marchi
2026-02-28  3:51     ` [PATCH v3 5/9] gdb/ctf: check return value of ctf_type_align Simon Marchi
2026-02-28  3:51     ` [PATCH v3 6/9] gdb/ctf: add scoped_time_it in elfctf_build_psymtabs Simon Marchi
2026-02-28  3:51     ` [PATCH v3 7/9] gdb: make expanded_symbols_functions hold compunit symtabs Simon Marchi
2026-03-04 19:21       ` Tom Tromey
2026-03-04 19:32         ` Tom Tromey
2026-03-09 18:56           ` Simon Marchi
2026-03-09 18:48         ` Simon Marchi
2026-03-10 17:09           ` Tom Tromey
2026-02-28  3:51     ` [PATCH v3 8/9] gdb/ctf: don't use psymtabs, create symtabs directly Simon Marchi
2026-03-04 19:29       ` Tom Tromey
2026-03-09 18:51         ` Simon Marchi
2026-02-28  3:51     ` [PATCH v3 9/9] gdb: remove psymtab.{c,h} Simon Marchi
2026-02-28 10:18       ` Eli Zaretskii
2026-03-04 19:33     ` [PATCH v3 0/9] Make CTF reader build full symtabs, get rid of psymtab Tom Tromey
2026-03-09 18:57       ` Simon Marchi
2026-02-03 13:00 [RFC PATCH 7/8] gdb/ctf: don't use psymtabs, create symtabs directly Jan Vrany

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox