58 return (objfile->
sf != NULL
59 && objfile_data (objfile, symfile_debug_objfile_data_key) != NULL);
76 objfile_data (objfile, symfile_debug_objfile_data_key);
91 objfile_data (objfile, symfile_debug_objfile_data_key);
109 objfile_data (objfile, symfile_debug_objfile_data_key);
120 const char *real_path,
121 int (*callback) (
struct symtab *,
126 objfile_data (objfile, symfile_debug_objfile_data_key);
130 "qf->map_symtabs_matching_filename (%s, \"%s\", \"%s\", %s, %s)\n",
132 real_path ? real_path : NULL,
137 (objfile, name, real_path, callback, data);
140 "qf->map_symtabs_matching_filename (...) = %d\n",
151 objfile_data (objfile, symfile_debug_objfile_data_key);
155 "qf->lookup_symbol (%s, %d, \"%s\", %s)\n",
174 objfile_data (objfile, symfile_debug_objfile_data_key);
186 objfile_data (objfile, symfile_debug_objfile_data_key);
200 objfile_data (objfile, symfile_debug_objfile_data_key);
212 const char *func_name)
215 objfile_data (objfile, symfile_debug_objfile_data_key);
218 "qf->expand_symtabs_for_function (%s, \"%s\")\n",
228 objfile_data (objfile, symfile_debug_objfile_data_key);
238 const char *fullname)
241 objfile_data (objfile, symfile_debug_objfile_data_key);
244 "qf->expand_symtabs_with_fullname (%s, \"%s\")\n",
254 int (*callback) (
struct block *,
261 objfile_data (objfile, symfile_debug_objfile_data_key);
264 "qf->map_matching_symbols (%s, \"%s\", %s, %d, %s, %s, %s, %s)\n",
281 (
struct objfile *objfile,
288 objfile_data (objfile, symfile_debug_objfile_data_key);
291 "qf->expand_symtabs_matching (%s, %s, %s, %s, %s, %s)\n",
314 objfile_data (objfile, symfile_debug_objfile_data_key);
318 "qf->find_pc_sect_compunit_symtab (%s, %s, %s, %s, %d)\n",
331 "qf->find_pc_sect_compunit_symtab (...) = %s\n",
345 objfile_data (objfile, symfile_debug_objfile_data_key);
347 "qf->map_symbol_filenames (%s, %s, %s, %d)\n",
379 debug_sym_get_probes (
struct objfile *objfile)
382 objfile_data (objfile, symfile_debug_objfile_data_key);
388 "probes->sym_get_probes (%s) = %s\n",
397 debug_sym_get_probes,
406 objfile_data (objfile, symfile_debug_objfile_data_key);
418 objfile_data (objfile, symfile_debug_objfile_data_key);
430 objfile_data (objfile, symfile_debug_objfile_data_key);
442 objfile_data (objfile, symfile_debug_objfile_data_key);
454 objfile_data (objfile, symfile_debug_objfile_data_key);
467 objfile_data (objfile, symfile_debug_objfile_data_key);
489 objfile_data (objfile, symfile_debug_objfile_data_key);
501 objfile_data (objfile, symfile_debug_objfile_data_key);
507 "sf->sym_relocate (%s, %s, %s) = %s\n",
533 &debug_sym_quick_functions
556 real_sf = objfile->
sf;
561 #define COPY_SF_PTR(from, to, name, func) \
564 (to)->debug_sf.name = func; \
570 COPY_SF_PTR (real_sf, debug_data, sym_read_psymbols,
575 COPY_SF_PTR (real_sf, debug_data, sym_read_linetable,
585 set_objfile_data (objfile, symfile_debug_objfile_data_key, debug_data);
600 debug_data = objfile_data (objfile, symfile_debug_objfile_data_key);
604 set_objfile_data (objfile, symfile_debug_objfile_data_key, NULL);
632 struct objfile *objfile;
662 symfile_debug_objfile_data_key
666 Set debugging of the symfile functions."),
_(
"\
667 Show debugging of the symfile functions."),
_(
"\
668 When enabled, all calls to the symfile functions are logged."),
static void debug_qf_relocate(struct objfile *objfile, const struct section_offsets *new_offsets, const struct section_offsets *delta)
char * hex_string(LONGEST num)
static const struct sym_probe_fns debug_sym_probe_fns
const char * symtab_to_filename_for_display(struct symtab *symtab)
void(* forget_cached_source_info)(struct objfile *objfile)
static void debug_sym_new_init(struct objfile *objfile)
void(* expand_symtabs_matching)(struct objfile *objfile, expand_symtabs_file_matcher_ftype *file_matcher, expand_symtabs_symbol_matcher_ftype *symbol_matcher, expand_symtabs_exp_notify_ftype *expansion_notify, enum search_domain kind, void *data)
static void debug_qf_expand_symtabs_with_fullname(struct objfile *objfile, const char *fullname)
static void debug_qf_dump(struct objfile *objfile)
enum domain_enum_tag domain_enum
void( expand_symtabs_exp_notify_ftype)(struct compunit_symtab *symtab, void *data)
struct compunit_symtab *(* find_pc_sect_compunit_symtab)(struct objfile *objfile, struct bound_minimal_symbol msymbol, CORE_ADDR pc, struct obj_section *section, int warn_if_readin)
static void debug_qf_forget_cached_source_info(struct objfile *objfile)
void objfile_set_sym_fns(struct objfile *objfile, const struct sym_fns *sf)
static void debug_sym_finish(struct objfile *objfile)
void(* expand_symtabs_with_fullname)(struct objfile *objfile, const char *fullname)
void(* print_stats)(struct objfile *objfile)
static struct compunit_symtab * debug_qf_lookup_symbol(struct objfile *objfile, int kind, const char *name, domain_enum domain)
static struct symtab * debug_qf_find_last_source_symtab(struct objfile *objfile)
void(* sym_read)(struct objfile *, int)
const struct sym_probe_fns * sym_probe_fns
const char * search_domain_name(enum search_domain e)
static int debug_qf_has_symbols(struct objfile *objfile)
struct compunit_symtab *(* lookup_symbol)(struct objfile *objfile, int block_index, const char *name, domain_enum domain)
static const char * debug_symtab_name(struct symtab *symtab)
static void debug_qf_expand_symtabs_for_function(struct objfile *objfile, const char *func_name)
static int symfile_debug_installed(struct objfile *objfile)
int(* map_symtabs_matching_filename)(struct objfile *objfile, const char *name, const char *real_path, int(*callback)(struct symtab *, void *), void *data)
static void debug_qf_expand_symtabs_matching(struct objfile *objfile, expand_symtabs_file_matcher_ftype *file_matcher, expand_symtabs_symbol_matcher_ftype *symbol_matcher, expand_symtabs_exp_notify_ftype *expansion_notify, enum search_domain kind, void *data)
static void debug_qf_expand_all_symtabs(struct objfile *objfile)
void initialize_file_ftype(void)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
static const struct quick_symbol_functions debug_sym_quick_functions
static int debug_qf_map_symtabs_matching_filename(struct objfile *objfile, const char *name, const char *real_path, int(*callback)(struct symtab *, void *), void *data)
static void debug_sym_offsets(struct objfile *objfile, const struct section_addr_info *info)
static void debug_qf_map_symbol_filenames(struct objfile *objfile, symbol_filename_ftype *fun, void *data, int need_fullname)
struct symtab * compunit_primary_filetab(const struct compunit_symtab *cust)
static struct compunit_symtab * debug_qf_find_pc_sect_compunit_symtab(struct objfile *objfile, struct bound_minimal_symbol msymbol, CORE_ADDR pc, struct obj_section *section, int warn_if_readin)
#define gdb_assert_not_reached(message)
const struct sym_fns * sf
int( expand_symtabs_symbol_matcher_ftype)(const char *name, void *data)
void(* sym_new_init)(struct objfile *)
void(* dump)(struct objfile *objfile)
struct symtab *(* find_last_source_symtab)(struct objfile *objfile)
void(* expand_all_symtabs)(struct objfile *objfile)
const char * domain_name(domain_enum e)
void(* expand_symtabs_for_function)(struct objfile *objfile, const char *func_name)
void(* sym_offsets)(struct objfile *, const struct section_addr_info *)
struct cmd_list_element * setdebuglist
void(* sym_finish)(struct objfile *)
void(* relocate)(struct objfile *objfile, const struct section_offsets *new_offsets, const struct section_offsets *delta)
struct ui_file * gdb_stdlog
void(* sym_read_psymbols)(struct objfile *)
int( symbol_compare_ftype)(const char *string1, const char *string2)
void(* sym_read_linetable)(struct objfile *)
#define ALL_PSPACES(pspace)
static void install_symfile_debug_logging(struct objfile *objfile)
int( expand_symtabs_file_matcher_ftype)(const char *filename, void *data, int basenames)
static void show_debug_symfile(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
struct minimal_symbol * minsym
const char * host_address_to_string(const void *addr)
const char * objfile_debug_name(const struct objfile *objfile)
#define COPY_SF_PTR(from, to, name, func)
static void uninstall_symfile_debug_logging(struct objfile *objfile)
static void debug_sym_read_psymbols(struct objfile *objfile)
initialize_file_ftype _initialize_symfile_debug
static struct symfile_segment_data * debug_sym_segments(bfd *abfd)
static void debug_qf_map_matching_symbols(struct objfile *objfile, const char *name, domain_enum domain, int global, int(*callback)(struct block *, struct symbol *, void *), void *data, symbol_compare_ftype *match, symbol_compare_ftype *ordered_compare)
void(* map_matching_symbols)(struct objfile *, const char *name, domain_enum domain, int global, int(*callback)(struct block *, struct symbol *, void *), void *data, symbol_compare_ftype *match, symbol_compare_ftype *ordered_compare)
static void debug_qf_print_stats(struct objfile *objfile)
static const struct objfile_data * symfile_debug_objfile_data_key
struct cmd_list_element * showdebuglist
static void debug_sym_read(struct objfile *objfile, int symfile_flags)
static void debug_sym_read_linetable(struct objfile *objfile)
static void set_debug_symfile(char *args, int from_tty, struct cmd_list_element *c)
void(* sym_init)(struct objfile *)
const struct quick_symbol_functions * qf
const struct sym_fns * real_sf
int(* has_symbols)(struct objfile *objfile)
static bfd_byte * debug_sym_relocate(struct objfile *objfile, asection *sectp, bfd_byte *buf)
#define ALL_PSPACE_OBJFILES(ss, obj)
bfd_byte *(* sym_relocate)(struct objfile *, asection *sectp, bfd_byte *buf)
static void symfile_debug_free_objfile(struct objfile *objfile, void *datum)
void( symbol_filename_ftype)(const char *filename, const char *fullname, void *data)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
static void debug_sym_init(struct objfile *objfile)
void(* map_symbol_filenames)(struct objfile *objfile, symbol_filename_ftype *fun, void *data, int need_fullname)