[pushed] Don't clear 'qf' in elf_symfile_read

Message ID 20210327224309.555159-1-tom@tromey.com
State New
Headers show
Series
  • [pushed] Don't clear 'qf' in elf_symfile_read
Related show

Commit Message

Tom Tromey March 27, 2021, 10:43 p.m.
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 | 4 ++++
 gdb/elfread.c | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.26.2

Patch

diff --git a/gdb/elfread.c b/gdb/elfread.c
index 49bbbec663e..1f4858521a9 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -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;
 	    }