]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove some "OBJF_READNOW" code from dwarf2_debug_names_index
authorTom Tromey <tom@tromey.com>
Tue, 30 Mar 2021 00:31:31 +0000 (18:31 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 20 Apr 2022 15:10:03 +0000 (09:10 -0600)
The dwarf2_debug_names_index code treats a NULL debug_names_table as
if it were from OBJF_READNOW.  However, this trick is only done for
gdb_index, never for debug_names -- see dwarf2_initialize_objfile.

gdb/dwarf2/read.c

index c0bb18a26f3acc88fdb1639baf5a5f637512c6bb..165bea9c5a859db02b17ee489689039b1b0b7de5 100644 (file)
@@ -5096,14 +5096,7 @@ dw2_debug_names_iterator::next ()
 void
 dwarf2_debug_names_index::dump (struct objfile *objfile)
 {
-  dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);
-
-  gdb_printf (".debug_names:");
-  if (per_objfile->per_bfd->debug_names_table)
-    gdb_printf (" exists\n");
-  else
-    gdb_printf (" faked for \"readnow\"\n");
-  gdb_printf ("\n");
+  gdb_printf (".debug_names: exists\n");
 }
 
 void
@@ -5115,10 +5108,6 @@ dwarf2_debug_names_index::expand_matching_symbols
 {
   dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);
 
-  /* debug_names_table is NULL if OBJF_READNOW.  */
-  if (!per_objfile->per_bfd->debug_names_table)
-    return;
-
   mapped_debug_names &map = *per_objfile->per_bfd->debug_names_table;
   const block_search_flags block_flags
     = global ? SEARCH_GLOBAL_BLOCK : SEARCH_STATIC_BLOCK;
@@ -5160,10 +5149,6 @@ dwarf2_debug_names_index::expand_symtabs_matching
 {
   dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);
 
-  /* debug_names_table is NULL if OBJF_READNOW.  */
-  if (!per_objfile->per_bfd->debug_names_table)
-    return true;
-
   dw_expand_symtabs_matching_file_matcher (per_objfile, file_matcher);
 
   /* This invariant is documented in quick-functions.h.  */