Skip to content

Commit 15659f0

Browse files
committed
Check for debug-types in map_symbol_filenames
map_symbol_filenames can skip type units -- in fact I think it has to, due to the assertion at the top of dw2_get_file_names. This may be a regression due to the TU/CU unification patch, I did not check.
1 parent e0ec6b1 commit 15659f0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gdb/dwarf2/read.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4420,7 +4420,8 @@ dwarf2_base_index_functions::map_symbol_filenames
44204420

44214421
for (const auto &per_cu : per_objfile->per_bfd->all_comp_units)
44224422
{
4423-
if (per_objfile->symtab_set_p (per_cu.get ()))
4423+
if (!per_cu->is_debug_types
4424+
&& per_objfile->symtab_set_p (per_cu.get ()))
44244425
{
44254426
if (per_cu->v.quick->file_names != nullptr)
44264427
qfn_cache.insert (per_cu->v.quick->file_names);
@@ -4430,7 +4431,8 @@ dwarf2_base_index_functions::map_symbol_filenames
44304431
for (const auto &per_cu : per_objfile->per_bfd->all_comp_units)
44314432
{
44324433
/* We only need to look at symtabs not already expanded. */
4433-
if (per_objfile->symtab_set_p (per_cu.get ()))
4434+
if (per_cu->is_debug_types
4435+
|| per_objfile->symtab_set_p (per_cu.get ()))
44344436
continue;
44354437

44364438
quick_file_names *file_data = dw2_get_file_names (per_cu.get (),

0 commit comments

Comments
 (0)