From d87251a45bceebbc90eed3161adb8ce75e35f959 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 17 Mar 2025 23:16:24 -0400 Subject: gdb/dwarf: use gdb::unordered_map for dwarf2_per_bfd::{quick_file_names_table,type_unit_groups} Change these two hash tables to use gdb::unordered_map. I changed these two at the same time because they both use the same key, a stmt_list_hash. Unlike other previous patches that used a gdb::unordered_set, use an unordered_map here because the key isn't found in the element itself (well, it was before, because of how htab works, but it didn't need to be). You'll notice that the type_unit_group structure is empty. That structure isn't really needed. It is removed in the following patch. Regression tested on Debian 12 amd64 with a bunch of DWARF target boards. Change-Id: Iec2289958d0f755cab8198f5b72ecab48358ba11 Approved-By: Tom Tromey --- gdb/dwarf2/read-debug-names.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gdb/dwarf2/read-debug-names.c') diff --git a/gdb/dwarf2/read-debug-names.c b/gdb/dwarf2/read-debug-names.c index 8c265dd..edac713 100644 --- a/gdb/dwarf2/read-debug-names.c +++ b/gdb/dwarf2/read-debug-names.c @@ -424,13 +424,12 @@ cooked_index_worker_debug_names::do_reading () exceptions.push_back (std::move (exc)); } - dwarf2_per_bfd *per_bfd = m_per_objfile->per_bfd; - per_bfd->quick_file_names_table - = create_quick_file_names_table (per_bfd->all_units.size ()); m_results.emplace_back (nullptr, complaint_handler.release (), std::move (exceptions), parent_map ()); + + dwarf2_per_bfd *per_bfd = m_per_objfile->per_bfd; cooked_index *table = (gdb::checked_static_cast (per_bfd->index_table.get ())); -- cgit v1.1