From d25e87199327846e42b5a23f4365d75e75517ab3 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 22 Sep 2016 13:57:15 -0600 Subject: Change minimal_symbol_reader to store objfile This changes minimal_symbol_reader to require the objfile to be passed to the constructor. The class now records the objfile and automatically uses it later in "install". This is a minor cleanup that will come in useful in the next patch. It is separate from the first patch to keep that one a bit simpler to understand. 2016-10-21 Tom Tromey * xcoffread.c (xcoff_initial_scan): Update. * mipsread.c (mipscoff_symfile_read): Update. * minsyms.c (minimal_symbol_reader): Add obj argument. Initialize member. (install): Remove objfile argument. Update. * mdebugread.c (elfmdebug_build_psymtabs): Update. * machoread.c (macho_symfile_read): Update. * elfread.c (elf_read_minimal_symbols): Update. * dbxread.c (dbx_symfile_read): Update. * coffread.c (coff_symfile_read): Update. * minsyms.h (minimal_symbol_reader): Add m_objfile member. (constructor): Add objfile argument. (minimal_symbol_reader::install): Remove objfile argument. --- gdb/xcoffread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/xcoffread.c') diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 3c843a0..ccd6149 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -3006,7 +3006,7 @@ xcoff_initial_scan (struct objfile *objfile, int symfile_flags) free_pending_blocks (); back_to = make_cleanup (really_free_pendings, 0); - minimal_symbol_reader reader; + minimal_symbol_reader reader (objfile); /* Now that the symbol table data of the executable file are all in core, process them and define symbols accordingly. */ @@ -3016,7 +3016,7 @@ xcoff_initial_scan (struct objfile *objfile, int symfile_flags) /* Install any minimal symbols that have been collected as the current minimal symbols for this objfile. */ - reader.install (objfile); + reader.install (); /* DWARF2 sections. */ -- cgit v1.1