diff options
author | Tom Tromey <tom@tromey.com> | 2021-03-20 17:23:40 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-03-20 17:23:45 -0600 |
commit | 3aa31ce7884f979c68d440a4352c8d69a3283f6c (patch) | |
tree | cd8cca0a29dab51523341631f0a229c3ec5a4c09 /gdb/psympriv.h | |
parent | 7b249e470a82063605c3789f4b2d0378400423de (diff) | |
download | gdb-3aa31ce7884f979c68d440a4352c8d69a3283f6c.zip gdb-3aa31ce7884f979c68d440a4352c8d69a3283f6c.tar.gz gdb-3aa31ce7884f979c68d440a4352c8d69a3283f6c.tar.bz2 |
Remove last objfile partial_symtab references from psymtab.c
This removes the last references to the partial_symtab via the objfile
from psymtab.c. require_partial_symbols is now a method on
psymbol_functions, and maintenance_print_psymbols is changed to use
dynamic_cast to verify that it is examining partial symbols.
gdb/ChangeLog
2021-03-20 Tom Tromey <tom@tromey.com>
* psymtab.c (psymbol_functions::require_partial_symbols): Rename.
(psymbol_functions::find_pc_sect_psymtab): Rename.
(psymbol_functions::find_pc_sect_compunit_symtab)
(maintenance_print_psymbols, maintenance_check_psymtabs): Update.
* psympriv.h (struct psymbol_functions) <require_partial_symbols>:
Declare new method.
<get_partial_symtabs, find_pc_sect_psymtab>: Likewise.
Diffstat (limited to 'gdb/psympriv.h')
-rw-r--r-- | gdb/psympriv.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/psympriv.h b/gdb/psympriv.h index 8717bd2..85651f5 100644 --- a/gdb/psympriv.h +++ b/gdb/psympriv.h @@ -559,6 +559,18 @@ struct psymbol_functions : public quick_symbol_functions m_psymbol_map.clear (); } + /* Ensure the partial symbols for OBJFILE have been loaded. Return + a range adapter for the psymtabs. */ + psymtab_storage::partial_symtab_range require_partial_symbols + (struct objfile *objfile); + + /* Return the partial symbol storage associated with this + object. */ + const std::shared_ptr<psymtab_storage> &get_partial_symtabs () const + { + return m_partial_symtabs; + } + /* Replace the partial symbol table storage in this object with SYMS. */ void set_partial_symtabs (const std::shared_ptr<psymtab_storage> &syms) @@ -566,6 +578,17 @@ struct psymbol_functions : public quick_symbol_functions m_partial_symtabs = syms; } + /* Find which partial symtab contains PC and SECTION. Return NULL if + none. We return the psymtab that contains a symbol whose address + exactly matches PC, or, if we cannot find an exact match, the + psymtab that contains a symbol whose address is closest to PC. */ + + struct partial_symtab *find_pc_sect_psymtab + (struct objfile *objfile, + CORE_ADDR pc, + struct obj_section *section, + struct bound_minimal_symbol msymbol); + private: void fill_psymbol_map (struct objfile *objfile, |