This removes a use of objfile->psymtabs by changing count_psyms to be
a method on psymbol_functions.
gdb/ChangeLog
2021-03-20 Tom Tromey <tom@tromey.com>
* psymtab.c (psymbol_functions::count_psyms): Rename.
(psymbol_functions::print_stats): Update.
* psympriv.h (struct psymbol_functions) <count_psyms>: Declare
method.
+2021-03-20 Tom Tromey <tom@tromey.com>
+
+ * psymtab.c (psymbol_functions::count_psyms): Rename.
+ (psymbol_functions::print_stats): Update.
+ * psympriv.h (struct psymbol_functions) <count_psyms>: Declare
+ method.
+
2021-03-20 Tom Tromey <tom@tromey.com>
* psymtab.c (psymbol_functions::require_partial_symbols): Rename.
private:
+ /* Count the number of partial symbols in *THIS. */
+ int count_psyms ();
+
void fill_psymbol_map (struct objfile *objfile,
struct partial_symtab *psymtab,
std::set<CORE_ADDR> *seen_addrs,
/* Count the number of partial symbols in OBJFILE. */
-static int
-count_psyms (struct objfile *objfile)
+int
+psymbol_functions::count_psyms ()
{
int count = 0;
- for (partial_symtab *pst : objfile->psymtabs ())
+ for (partial_symtab *pst : m_partial_symtabs->range ())
{
count += pst->global_psymbols.size ();
count += pst->static_psymbols.size ();
if (!print_bcache)
{
- int n_psyms = count_psyms (objfile);
+ int n_psyms = count_psyms ();
if (n_psyms > 0)
printf_filtered (_(" Number of \"partial\" symbols read: %d\n"),
n_psyms);