Change how some psymbol readers access the psymtab storage
authorTom Tromey <tom@tromey.com>
Sat, 20 Mar 2021 23:23:40 +0000 (17:23 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 20 Mar 2021 23:23:42 +0000 (17:23 -0600)
commit7e9c0476a7085cbebdc818d163d5c3bd46da6388
tree91e6634d8595b50acb4d97fdd0dfd05d7754aa2f
parent75336a5a2aa345953d0a9de73205457b6d9e27c2
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.
gdb/ChangeLog
gdb/dbxread.c
gdb/mdebugread.c
gdb/stabsread.h
gdb/xcoffread.c