Don't clear 'qf' in elf_symfile_read
authorTom Tromey <tom@tromey.com>
Sat, 27 Mar 2021 22:41:53 +0000 (16:41 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 27 Mar 2021 22:41:53 +0000 (16:41 -0600)
I noticed that I forgot to make a change in my series to make it
possible to attach multiple debug readers to an objfile.  In one spot,
elf_symfile_read still clears the 'qf' list.  However, this should
have been removed toward the end of that series.

This patch fixes the offending spot.  Tested on x86-64 Fedora 32.

gdb/ChangeLog
2021-03-27  Tom Tromey  <tom@tromey.com>

* elfread.c (elf_symfile_read): Don't clear 'qf'.

gdb/ChangeLog
gdb/elfread.c

index c3063b8c90ca414e55586d51e69ad9b75ba1094b..bdd01c9c4bd3f20eee17d30e1a8fd8a8df2c0902 100644 (file)
@@ -1,3 +1,7 @@
+2021-03-27  Tom Tromey  <tom@tromey.com>
+
+       * elfread.c (elf_symfile_read): Don't clear 'qf'.
+
 2021-03-26  Lancelot Six  <lsix@lancelotsix.com>
 
        * contrib/gdb-add-index.sh: Avoid variable shadowing and get
index 49bbbec663e8a12d3c612566786c4d89fb6d9d17..1f4858521a968e6023a7877145072a5a32980b38 100644 (file)
@@ -1286,7 +1286,6 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
              objfile->qf.push_front (make_dwarf_gdb_index ());
              break;
            case dw_index_kind::DEBUG_NAMES:
-             objfile->qf.clear ();
              objfile->qf.push_front (make_dwarf_debug_names ());
              break;
            }