diff options
author | Tom Tromey <tom@tromey.com> | 2016-09-22 13:57:15 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2016-10-21 14:17:33 -0600 |
commit | d25e87199327846e42b5a23f4365d75e75517ab3 (patch) | |
tree | 78c9a15317d99e16229021085b82c275d93e2ef5 /gdb/minsyms.h | |
parent | 873a915e0ad44cb303b071638536f27569491030 (diff) | |
download | gdb-d25e87199327846e42b5a23f4365d75e75517ab3.zip gdb-d25e87199327846e42b5a23f4365d75e75517ab3.tar.gz gdb-d25e87199327846e42b5a23f4365d75e75517ab3.tar.bz2 |
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.
Diffstat (limited to 'gdb/minsyms.h')
-rw-r--r-- | gdb/minsyms.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/minsyms.h b/gdb/minsyms.h index d75bd41..b83e2d0 100644 --- a/gdb/minsyms.h +++ b/gdb/minsyms.h @@ -64,14 +64,14 @@ class minimal_symbol_reader Currently, minimal symbol table creation is not reentrant; it relies on global (static) variables in minsyms.c. */ - explicit minimal_symbol_reader (); + explicit minimal_symbol_reader (struct objfile *); ~minimal_symbol_reader (); /* Install the minimal symbols that have been collected into the given objfile. */ - void install (struct objfile *); + void install (); private: @@ -79,6 +79,8 @@ class minimal_symbol_reader minimal_symbol_reader &operator= (const minimal_symbol_reader &); minimal_symbol_reader (const minimal_symbol_reader &); + + struct objfile *m_objfile; }; /* Record a new minimal symbol. This is the "full" entry point; |