This simplifies the setting and clearing of reading_partial_symbols,
by using scoped_restore in the function that reads partial symbols.
gdb/ChangeLog
2020-02-24 Tom Tromey <tom@tromey.com>
* dwarf2read.c (dwarf2_build_psymtabs_hard): Use
make_scoped_restore.
(dwarf2_psymtab::read_symtab): Don't clear
reading_partial_symbols.
+2020-02-24 Tom Tromey <tom@tromey.com>
+
+ * dwarf2read.c (dwarf2_build_psymtabs_hard): Use
+ make_scoped_restore.
+ (dwarf2_psymtab::read_symtab): Don't clear
+ reading_partial_symbols.
+
2020-02-24 Tom de Vries <tdevries@suse.de>
PR gdb/25592
objfile_name (objfile));
}
- dwarf2_per_objfile->reading_partial_symbols = 1;
+ scoped_restore restore_reading_psyms
+ = make_scoped_restore (&dwarf2_per_objfile->reading_partial_symbols,
+ true);
dwarf2_per_objfile->info.read (objfile);
= dpo_backlink->has_section_at_zero;
}
- dwarf2_per_objfile->reading_partial_symbols = 0;
-
expand_psymtab (objfile);
process_cu_includes (dwarf2_per_objfile);