Change how some psymbol readers access the psymtab storage
Currently, all psymbol readers access the psymtab storage via the
objfile. This is done directly at any spot requiring the storage.
In order to move psymbols out of the objfile, the psymtab_storage must
be passed in explicitly. This patch consolidates the access of the
storage in a single place in these readers, updating various functions
to pass the storage object around. "Hidden" uses, like
"objfile->psymtabs ()", are also updated.
The DWARF reader is not yet touched. That requires more complicated
changes.
gdb/ChangeLog
2021-03-20 Tom Tromey <tom@tromey.com>
* xcoffread.c (xcoff_end_psymtab): Add partial_symtabs parameter.
(xcoff_end_psymtab): Update.
(scan_xcoff_symtab): Add partial_symtabs parameter.
(xcoff_initial_scan): Update.
* stabsread.h (dbx_end_psymtab): Add partial_symtabs parameter.
* mdebugread.c (mdebug_build_psymtabs): Update.
(parse_partial_symbols): Add partial_symtabs parameter.
* dbxread.c (dbx_symfile_read): Update.
(read_dbx_symtab): Add partial_symtabs parameter.
(read_dbx_symtab): Update.
(dbx_end_psymtab): Add partial_symtabs parameter.