forked from Imagelibrary/binutils-gdb
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 <tom@tromey.com> * 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.
This commit is contained in:
@@ -855,7 +855,7 @@ macho_symfile_read (struct objfile *objfile, int symfile_flags)
|
||||
symbol_table = (asymbol **) xmalloc (storage_needed);
|
||||
make_cleanup (xfree, symbol_table);
|
||||
|
||||
minimal_symbol_reader reader;
|
||||
minimal_symbol_reader reader (objfile);
|
||||
|
||||
symcount = bfd_canonicalize_symtab (objfile->obfd, symbol_table);
|
||||
|
||||
@@ -866,7 +866,7 @@ macho_symfile_read (struct objfile *objfile, int symfile_flags)
|
||||
|
||||
macho_symtab_read (objfile, symcount, symbol_table, &oso_vector);
|
||||
|
||||
reader.install (objfile);
|
||||
reader.install ();
|
||||
}
|
||||
|
||||
/* Try to read .eh_frame / .debug_frame. */
|
||||
|
||||
Reference in New Issue
Block a user