diff options
author | Tom Tromey <tom@tromey.com> | 2021-03-14 11:38:54 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-04-12 09:31:16 -0600 |
commit | 51f5a4b8e9397ae9e93789cd7974fa62aeee6cd2 (patch) | |
tree | b128706b2b30b9dd0c67efa1e88a500c98245676 /gdb/Makefile.in | |
parent | a2f0ab9310cb2ff235b436e0492fbaa804ce1bc9 (diff) | |
download | gdb-51f5a4b8e9397ae9e93789cd7974fa62aeee6cd2.zip gdb-51f5a4b8e9397ae9e93789cd7974fa62aeee6cd2.tar.gz gdb-51f5a4b8e9397ae9e93789cd7974fa62aeee6cd2.tar.bz2 |
Introduce the new DWARF index class
This patch introduces the new DWARF index class. It is called
"cooked" to contrast against a "raw" index, which is mapped from disk
without extra effort.
Nothing constructs a cooked index yet. The essential idea here is
that index entries are created via the "add" method; then when all the
entries have been read, they are "finalize"d -- name canonicalization
is performed and the entries are added to a sorted vector.
Entries use the DWARF name (DW_AT_name) or linkage name, not the full
name as is done for partial symbols.
These two facets -- the short name and the deferred canonicalization
-- help improve the performance of this approach. This will become
clear in later patches, when parallelization is added.
Some special code is needed for Ada, because GNAT only emits mangled
("encoded", in the Ada lingo) names, and so we reconstruct the
hierarchical structure after the fact. This is also done in the
finalization phase.
One other aspect worth noting is that the way the "main" function is
found is different in the new code. Currently gdb will notice
DW_AT_main_subprogram, but won't recognize "main" during reading --
this is done later, via explicit symbol lookup. This is done
differently in the new code so that finalization can be done in the
background without then requiring a synchronization to look up the
symbol.
Diffstat (limited to 'gdb/Makefile.in')
-rw-r--r-- | gdb/Makefile.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 1374f29..872fbe1 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1047,6 +1047,7 @@ COMMON_SFILES = \ dwarf2/abbrev-cache.c \ dwarf2/attribute.c \ dwarf2/comp-unit-head.c \ + dwarf2/cooked-index.c \ dwarf2/cu.c \ dwarf2/dwz.c \ dwarf2/expr.c \ @@ -1294,6 +1295,7 @@ HFILES_NO_SRCDIR = \ disasm-flags.h \ disasm.h \ dummy-frame.h \ + dwarf2/cooked-index.h \ dwarf2/cu.h \ dwarf2/frame-tailcall.h \ dwarf2/frame.h \ |