Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Loading some symbols, when, and index-cache
@ 2025-04-06 15:07 Lluís Batlle i Rossell via Gdb
  2025-04-07 12:05 ` Guinevere Larsen via Gdb
  0 siblings, 1 reply; 8+ messages in thread
From: Lluís Batlle i Rossell via Gdb @ 2025-04-06 15:07 UTC (permalink / raw)
  To: gdb

Hello,

I'm trying to make sense of what symbols are loaded and when, in gdb.
For example, opening an elf file, it will build some index (usable as
index-cache) of some symbols, but not all.

If I do "gdb gdb" (for my compiled gdb), and then "maint print stat" I
get:

  Number of "minimal" symbols read: 33435
  Number of read CUs: 0
  Number of unread CUs: 682

Why haven't all CUs been read, and incorporated into the index? Because at
file loading the CUs symbols index is generated with worker threads (read.c),
therefore, potentially using all cores of the system. And the result would
be cached in the index-cache.

Because the next thing I notice is that when I type "list def<TAB>" to get
symbol completion, a very slow single-thread symbol expansion causes many CUs
to be loaded. After which:, "maint print stat":

  Number of "minimal" symbols read: 33435
  Number of "full" symbols read: 2732412
  Number of "types" defined: 4292812
  Number of symbol tables: 57075
  Number of symbol tables with line tables: 9608
  Number of symbol tables with blockvectors: 351
  Number of read CUs: 351
  Number of unread CUs: 331

Is there any way this work can be done ahead? Why the index-cache only helps
for the "minimal" symbols? How can we use the cache for all symbols? Why not
all CUs have been loaded yet?

Regards,
Lluís.

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

end of thread, other threads:[~2025-04-22 15:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-06 15:07 Loading some symbols, when, and index-cache Lluís Batlle i Rossell via Gdb
2025-04-07 12:05 ` Guinevere Larsen via Gdb
2025-04-07 12:21   ` Lluís Batlle i Rossell via Gdb
2025-04-07 16:01     ` Simon Marchi via Gdb
2025-04-08  7:29       ` Lluís Batlle i Rossell via Gdb
2025-04-08 13:43         ` Simon Marchi via Gdb
2025-04-09  7:42           ` Lluís Batlle i Rossell via Gdb
2025-04-22 15:31             ` Simon Marchi via Gdb

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