aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-02-10 07:18:15 -0700
committerTom Tromey <tromey@adacore.com>2023-03-27 08:18:55 -0600
commitb6c55de76b1a30debca52f52c479ca3b8e3fee53 (patch)
treeca505f268507c25ad016b7b6bd2c12e4717d35cf /gdb/dwarf2
parent2215170485845673379b59d3e4e5e1a9ac01ba41 (diff)
downloadgdb-b6c55de76b1a30debca52f52c479ca3b8e3fee53.zip
gdb-b6c55de76b1a30debca52f52c479ca3b8e3fee53.tar.gz
gdb-b6c55de76b1a30debca52f52c479ca3b8e3fee53.tar.bz2
Populate seen_names hash in cooked_index_shard::do_finalize
Hannes pointed out that cooked_index_shard::do_finalize never populates the seen_names hash table. This patch adds the necessary store. This reduces memory use a little for "gdb gdb": (before) Space used: 28909568 (+0 for this command) (after) Space used: 28884992 (+0 for this command) What this means, btw, is that in gdb there are not many symbols that are both mentioned in many CUs and that also require name canonicalization. It's possible this would differ in other programs.
Diffstat (limited to 'gdb/dwarf2')
-rw-r--r--gdb/dwarf2/cooked-index.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c
index 3a90769..900f13c 100644
--- a/gdb/dwarf2/cooked-index.c
+++ b/gdb/dwarf2/cooked-index.c
@@ -378,6 +378,7 @@ cooked_index_shard::do_finalize ()
entry->canonical = canon_name.get ();
m_names.push_back (std::move (canon_name));
}
+ *slot = entry;
}
else
{