Move psymbol_map out of objfile
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)
commit75336a5a2aa345953d0a9de73205457b6d9e27c2
tree73e2373cad911b81c529089a73db5b199b26ae05
parent39298a5d973d5822ed7d09230f67cc83f72a06c2
Move psymbol_map out of objfile

objfile::psymbol_map is used to implement a Rust feature.  It is
currently specific to partial symbols -- it isn't used by the DWARF
indices.

This patch moves it out of objfile and into psymbol_functions, adding
a new method to quick_symbol_functions to handle the clearing case.
This is needed because the map holds unrelocated addresses.

gdb/ChangeLog
2021-03-20  Tom Tromey  <tom@tromey.com>

* quick-symbol.h (struct quick_symbol_functions)
<relocated>: New method.
* psymtab.h (struct psymbol_functions) <relocated>: New
method.
<fill_psymbol_map>: Declare method.
<m_psymbol_map>: New member.
* psymtab.c (psymbol_functions::fill_psymbol_map): Rename.
(psymbol_functions::find_compunit_symtab_by_address): Update.
* objfiles.h (reset_psymtabs): Don't clear psymbol_map.
(struct objfile) <psymbol_map>: Remove.
* objfiles.c (objfile_relocate1): Update.
gdb/ChangeLog
gdb/objfiles.c
gdb/objfiles.h
gdb/psympriv.h
gdb/psymtab.c
gdb/quick-symbol.h