]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/dwarf: use gdb::unordered_map for dwarf2_per_bfd::{quick_file_names_table,type_un...
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 18 Mar 2025 03:16:24 +0000 (23:16 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 18 Mar 2025 19:45:09 +0000 (15:45 -0400)
commitd87251a45bceebbc90eed3161adb8ce75e35f959
tree68c0b13c1e76f79a8233767ccf0ad4fb045e6ef2
parent545c11e607baeae49d61546ba317c2c460a9c3e7
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 <tom@tromey.com>
gdb/dwarf2/read-debug-names.c
gdb/dwarf2/read-gdb-index.c
gdb/dwarf2/read.c
gdb/dwarf2/read.h