/* "Quick" symbol functions
- Copyright (C) 2021 Free Software Foundation, Inc.
+ Copyright (C) 2021-2022 Free Software Foundation, Inc.
This file is part of GDB.
available. */
virtual bool has_symbols (struct objfile *objfile) = 0;
+ /* Return true if OBJFILE has any unexpanded symtabs. A return value of
+ false indicates there are no unexpanded symtabs, this might mean that
+ all of the symtabs have been expanded (full debug has been read in),
+ or it might been that OBJFILE has no debug information. */
+ virtual bool has_unexpanded_symtabs (struct objfile *objfile) = 0;
+
/* Return the symbol table for the "last" file appearing in
OBJFILE. */
virtual struct symtab *find_last_source_symtab (struct objfile *objfile) = 0;
virtual void expand_all_symtabs (struct objfile *objfile) = 0;
/* Find global or static symbols in all tables that are in DOMAIN
- and for which MATCH (symbol name, NAME) == 0, passing each to
- CALLBACK, reading in partial symbol tables as needed. Look
- through global symbols if GLOBAL and otherwise static symbols.
- Passes NAME and NAMESPACE to CALLBACK with each symbol
- found. After each block is processed, passes NULL to CALLBACK.
+ and for which MATCH (symbol name, NAME) == 0, reading in partial
+ symbol tables as needed. Look through global symbols if GLOBAL
+ and otherwise static symbols.
+
MATCH must be weaker than strcmp_iw_ordered in the sense that
strcmp_iw_ordered(x,y) == 0 --> MATCH(x,y) == 0. ORDERED_COMPARE,
if non-null, must be an ordering relation compatible with
and
strcmp_iw_ordered(x,y) <= 0 --> ORDERED_COMPARE(x,y) <= 0
(allowing strcmp_iw_ordered(x,y) < 0 while ORDERED_COMPARE(x, y) == 0).
- CALLBACK returns true to indicate that the scan should continue, or
- false to indicate that the scan should be terminated. */
+ */
- virtual void map_matching_symbols
+ virtual void expand_matching_symbols
(struct objfile *,
const lookup_name_info &lookup_name,
domain_enum domain,
int global,
- gdb::function_view<symbol_found_callback_ftype> callback,
symbol_compare_ftype *ordered_compare) = 0;
/* Expand all symbol tables in OBJFILE matching some criteria.
If the symbol name does not match LOOKUP_NAME, the symbol is skipped.
If SYMBOL_MATCHER returns false, then the symbol is skipped.
+ Note that if SYMBOL_MATCHER is non-NULL, then LOOKUP_NAME must
+ also be provided.
Otherwise, the symbol's symbol table is expanded and the
notification function is called. If the notification function