]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Check for debug-types in map_symbol_filenames
authorTom Tromey <tom@tromey.com>
Sun, 4 Jul 2021 19:33:12 +0000 (13:33 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 17 Jul 2021 16:41:42 +0000 (10:41 -0600)
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.

gdb/dwarf2/read.c

index c730c528a1ec978eafe391f39ebd378ddbd19f2c..90542599cb30eb193ce8514cd404b88a7047bf71 100644 (file)
@@ -4420,7 +4420,8 @@ dwarf2_base_index_functions::map_symbol_filenames
 
   for (const auto &per_cu : per_objfile->per_bfd->all_comp_units)
     {
-      if (per_objfile->symtab_set_p (per_cu.get ()))
+      if (!per_cu->is_debug_types
+         && per_objfile->symtab_set_p (per_cu.get ()))
        {
          if (per_cu->v.quick->file_names != nullptr)
            qfn_cache.insert (per_cu->v.quick->file_names);
@@ -4430,7 +4431,8 @@ dwarf2_base_index_functions::map_symbol_filenames
   for (const auto &per_cu : per_objfile->per_bfd->all_comp_units)
     {
       /* We only need to look at symtabs not already expanded.  */
-      if (per_objfile->symtab_set_p (per_cu.get ()))
+      if (per_cu->is_debug_types
+         || per_objfile->symtab_set_p (per_cu.get ()))
        continue;
 
       quick_file_names *file_data = dw2_get_file_names (per_cu.get (),