[binutils-gdb] Skip partial units in process_psymtab_comp_unit
Tom Tromey via Gdb-cvs <[email protected]>
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=92e57d264be706f0e0511d143727e812a61cc272 commit 92e57d264be706f0e0511d143727e812a61cc272 Author: Tom Tromey <[email protected]> Date: Sun Mar 30 07:52:34 2025 -0600 Skip partial units in process_psymtab_comp_unit process_psymtab_comp_unit passes 'false' for the 'skip_partial' argument to the cutu_reader constructor, but then proceeds to skip partial units. This patch simplifies the code by passing 'true' instead. Acked-By: Tom de Vries <[email protected]> Approved-By: Simon Marchi <[email protected]> Diff: --- gdb/dwarf2/read.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index f7d3f3f9172..520b98c3485 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -3307,7 +3307,7 @@ cooked_index_worker_debug_info::process_unit { auto new_reader = std::make_unique<cutu_reader> (*this_cu, *per_objfile, nullptr, - false, std::nullopt, + true, std::nullopt, storage->get_abbrev_table_cache ()); if (new_reader->is_dummy ()) @@ -3321,7 +3321,7 @@ cooked_index_worker_debug_info::process_unit if (this_cu->is_debug_types ()) process_type_unit (reader, storage); - else if (reader->top_level_die ()->tag != DW_TAG_partial_unit) + else { bool nope = false; if (this_cu->scanned.compare_exchange_strong (nope, true))