85 for (
const auto &iter :
qf)
88 && iter->can_lazily_read_symbols ())
91 retval = iter->has_symbols (
this);
114 if (iter->has_unexpanded_symtabs (
this))
131 struct symtab *retval =
nullptr;
139 retval = iter->find_last_source_symtab (
this);
140 if (retval !=
nullptr)
159 iter->forget_cached_source_info (
this);
164 (
const char *
name,
const char *real_path,
165 gdb::function_view<
bool (
symtab *)> callback)
169 "qf->map_symtabs_matching_filename (%s, \"%s\", "
172 real_path ? real_path : NULL,
173 host_address_to_string (&callback));
176 const char *name_basename = lbasename (
name);
178 auto match_one_filename = [&] (
const char *filename,
bool basenames)
182 if (basenames && FILENAME_CMP (name_basename, filename) == 0)
184 if (real_path !=
nullptr && IS_ABSOLUTE_PATH (filename)
185 && IS_ABSOLUTE_PATH (real_path))
186 return filename_cmp (filename, real_path) == 0;
207 if (!iter->expand_symtabs_matching (
this,
224 "qf->map_symtabs_matching_filename (...) = %d\n",
239 "qf->lookup_symbol (%s, %d, \"%s\", %s)\n",
247 struct symbol *sym, *with_opaque = NULL;
248 const struct blockvector *bv = stab->blockvector ();
266 if (with_opaque != NULL
276 if (!iter->expand_symtabs_matching (
this,
306 iter->print_stats (
this, print_bcache);
316 for (
const auto &iter :
qf)
325 "qf->expand_symtabs_for_function (%s, \"%s\")\n",
332 iter->expand_symtabs_matching (
this,
351 iter->expand_all_symtabs (
this);
359 "qf->expand_symtabs_with_fullname (%s, \"%s\")\n",
362 const char *basename = lbasename (fullname);
363 auto file_matcher = [&] (
const char *filename,
bool basenames)
365 return filename_cmp (basenames ? basename : fullname, filename) == 0;
369 iter->expand_symtabs_matching (
this,
388 "qf->expand_matching_symbols (%s, %s, %d, %s)\n",
391 host_address_to_string (ordered_compare));
394 iter->expand_matching_symbols (
this,
name, domain, global,
400 (gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
402 gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
403 gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
404 block_search_flags search_flags,
409 gdb_assert (lookup_name !=
nullptr || symbol_matcher ==
nullptr);
413 "qf->expand_symtabs_matching (%s, %s, %s, %s, %s)\n",
415 host_address_to_string (&file_matcher),
416 host_address_to_string (&symbol_matcher),
417 host_address_to_string (&expansion_notify),
421 if (!iter->expand_symtabs_matching (
this, file_matcher, lookup_name,
422 symbol_matcher, expansion_notify,
423 search_flags, domain, kind))
438 "qf->find_pc_sect_compunit_symtab (%s, %s, %s, %s, %d)\n",
440 host_address_to_string (msymbol.
minsym),
442 host_address_to_string (section),
447 retval = iter->find_pc_sect_compunit_symtab (
this, msymbol, pc, section,
449 if (retval !=
nullptr)
455 "qf->find_pc_sect_compunit_symtab (...) = %s\n",
469 "qf->map_symbol_filenames (%s, ..., %d)\n",
474 iter->map_symbol_filenames (
this, fun, need_fullname);
482 "qf->find_compunit_symtab_by_address (%s, %s)\n",
484 hex_string (address));
489 result = iter->find_compunit_symtab_by_address (
this, address);
490 if (result !=
nullptr)
496 "qf->find_compunit_symtab_by_address (...) = %s\n",
507 bool *symbol_found_p)
510 *symbol_found_p =
false;
514 result = iter->lookup_global_symbol_language (
this,
name, domain,
530 bool printed =
false;
531 for (
const auto &iter :
qf)
533 if (iter->can_lazily_read_symbols ())
535 if (verbose && !printed)
537 gdb_printf (_(
"Reading symbols from %s...\n"),
541 iter->read_partial_symbols (
this);
545 gdb_printf (_(
"(No debugging symbols found in %s)\n"),
553static const std::vector<std::unique_ptr<probe>> &
559 const std::vector<std::unique_ptr<probe>> &retval
563 "probes->sym_get_probes (%s) = %s\n",
565 host_address_to_string (retval.data ()));
634 host_address_to_string (&info));
645 gdb_assert_not_reached (
"debug_sym_segments called");
670 "sf->sym_relocate (%s, %s, %s) = %s\n",
672 host_address_to_string (sectp),
673 host_address_to_string (buf),
674 host_address_to_string (retval));
714#define COPY_SF_PTR(from, to, name, func) \
717 (to)->debug_sf.name = func; \
808Set debugging of the symfile functions."), _(
"\
809Show debugging of the symfile functions."), _(
"\
810When enabled, all calls to the symfile functions are logged."),
struct symbol * block_find_symbol(const struct block *block, const char *name, const domain_enum domain, block_symbol_matcher_ftype *matcher, void *data)
int block_find_non_opaque_type_preferred(struct symbol *sym, void *data)
lookup_name_info make_ignore_params() const
void set(unsigned key, void *datum)
struct cmd_list_element * showdebuglist
struct cmd_list_element * setdebuglist
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class theclass, bool *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
const char * objfile_debug_name(const struct objfile *objfile)
const char * objfile_debug_name(const struct objfile *objfile)
int objfile_has_symbols(struct objfile *objfile)
const char * objfile_name(const struct objfile *objfile)
std::vector< struct program_space * > program_spaces
int() symbol_compare_ftype(const char *string1, const char *string2)
const char * symtab_to_filename_for_display(struct symtab *symtab)
struct block * block(size_t i)
struct minimal_symbol * minsym
symtab * primary_filetab() const
const struct sym_fns * real_sf
void forget_cached_source_info()
const struct sym_fns * sf
struct compunit_symtab * compunit_symtabs
struct compunit_symtab * lookup_symbol(block_enum kind, const char *name, domain_enum domain)
void expand_symtabs_with_fullname(const char *fullname)
struct symtab * find_last_source_symtab()
void expand_symtabs_for_function(const char *func_name)
bool expand_symtabs_matching(gdb::function_view< expand_symtabs_file_matcher_ftype > file_matcher, const lookup_name_info *lookup_name, gdb::function_view< expand_symtabs_symbol_matcher_ftype > symbol_matcher, gdb::function_view< expand_symtabs_exp_notify_ftype > expansion_notify, block_search_flags search_flags, domain_enum domain, enum search_domain kind)
void print_stats(bool print_bcache)
bool map_symtabs_matching_filename(const char *name, const char *real_path, gdb::function_view< bool(symtab *)> callback)
void expand_all_symtabs()
void require_partial_symbols(bool verbose)
bool has_unexpanded_symtabs()
std::forward_list< quick_symbol_functions_up > qf
enum language lookup_global_symbol_language(const char *name, domain_enum domain, bool *symbol_found_p)
void map_symbol_filenames(gdb::function_view< symbol_filename_ftype > fun, bool need_fullname)
void expand_matching_symbols(const lookup_name_info &name, domain_enum domain, int global, symbol_compare_ftype *ordered_compare)
const std::forward_list< quick_symbol_functions_up > & qf_require_partial_symbols()
struct compunit_symtab * find_compunit_symtab_by_address(CORE_ADDR address)
struct compunit_symtab * find_pc_sect_compunit_symtab(struct bound_minimal_symbol msymbol, CORE_ADDR pc, struct obj_section *section, int warn_if_readin)
bool has_partial_symbols()
bfd_byte *(* sym_relocate)(struct objfile *, asection *sectp, bfd_byte *buf)
void(* sym_read)(struct objfile *, symfile_add_flags)
void(* sym_read_linetable)(struct objfile *)
void(* sym_new_init)(struct objfile *)
void(* sym_init)(struct objfile *)
const struct sym_probe_fns * sym_probe_fns
void(* sym_offsets)(struct objfile *, const section_addr_info &)
void(* sym_finish)(struct objfile *)
const std::vector< std::unique_ptr< probe > > &(* sym_get_probes)(struct objfile *)
static const std::vector< std::unique_ptr< probe > > & debug_sym_get_probes(struct objfile *objfile)
static void debug_sym_new_init(struct objfile *objfile)
void _initialize_symfile_debug()
static void debug_sym_read_linetable(struct objfile *objfile)
static void show_debug_symfile(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void set_debug_symfile(const char *args, int from_tty, struct cmd_list_element *c)
static void debug_sym_finish(struct objfile *objfile)
static const char * debug_symtab_name(struct symtab *symtab)
void objfile_set_sym_fns(struct objfile *objfile, const struct sym_fns *sf)
static const struct sym_probe_fns debug_sym_probe_fns
static void install_symfile_debug_logging(struct objfile *objfile)
static void debug_sym_offsets(struct objfile *objfile, const section_addr_info &info)
static void debug_sym_init(struct objfile *objfile)
static const registry< objfile >::key< debug_sym_fns_data > symfile_debug_objfile_data_key
static int symfile_debug_installed(struct objfile *objfile)
static bfd_byte * debug_sym_relocate(struct objfile *objfile, asection *sectp, bfd_byte *buf)
static void debug_sym_read(struct objfile *objfile, symfile_add_flags symfile_flags)
static bool debug_symfile
static symfile_segment_data_up debug_sym_segments(bfd *abfd)
#define COPY_SF_PTR(from, to, name, func)
static const struct sym_fns debug_sym_fns
static void uninstall_symfile_debug_logging(struct objfile *objfile)
std::unique_ptr< symfile_segment_data > symfile_segment_data_up
std::vector< other_sections > section_addr_info
const char * domain_name(domain_enum e)
bool symbol_matches_search_name(const struct general_symbol_info *gsymbol, const lookup_name_info &name)
bool compare_filenames_for_search(const char *filename, const char *search_name)
const char * search_domain_name(enum search_domain e)
bool iterate_over_some_symtabs(const char *name, const char *real_path, struct compunit_symtab *first, struct compunit_symtab *after_last, gdb::function_view< bool(symtab *)> callback)
void gdb_printf(struct ui_file *stream, const char *format,...)