[RFA,27/42] Do not look at file symbols when reading psymtabs

Message ID 20180523045851.11660-28-tom@tromey.com
State New, archived
Headers

Commit Message

Tom Tromey May 23, 2018, 4:58 a.m. UTC
  The DWARF reader was setting the list_in_scope member when reading
partial symbols.  however, this member is only useful when reading
full symbols.  Future patches will make this assert, so remove these
unneeded initializations.

gdb/ChangeLog
2018-05-22  Tom Tromey  <tom@tromey.com>

	* dwarf2read.c (process_psymtab_comp_unit_reader)
	(build_type_psymtabs_reader): Do not set list_in_scope.
---
 gdb/ChangeLog    | 5 +++++
 gdb/dwarf2read.c | 3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)
  

Comments

Simon Marchi July 10, 2018, 3:19 a.m. UTC | #1
On 2018-05-23 12:58 AM, Tom Tromey wrote:
> The DWARF reader was setting the list_in_scope member when reading
> partial symbols.  however, this member is only useful when reading
> full symbols.  Future patches will make this assert, so remove these
> unneeded initializations.

Makes sense, LGTM.

Simon
  

Patch

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index ffea27c064..3cc15ab645 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -7929,8 +7929,6 @@  process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
 
   prepare_one_comp_unit (cu, comp_unit_die, info->pretend_language);
 
-  cu->list_in_scope = &file_symbols;
-
   /* Allocate a new partial symbol table structure.  */
   filename = dwarf2_string_attr (comp_unit_die, DW_AT_name, cu);
   if (filename == NULL)
@@ -8098,7 +8096,6 @@  build_type_psymtabs_reader (const struct die_reader_specs *reader,
   VEC_safe_push (sig_type_ptr, tu_group->tus, sig_type);
 
   prepare_one_comp_unit (cu, type_unit_die, language_minimal);
-  cu->list_in_scope = &file_symbols;
   pst = create_partial_symtab (per_cu, "");
   pst->anonymous = 1;