GDB (xrefs)
|
#include "defs.h"
#include "arch-utils.h"
#include "bfdlink.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "gdbcore.h"
#include "frame.h"
#include "target.h"
#include "value.h"
#include "symfile.h"
#include "objfiles.h"
#include "source.h"
#include "gdbcmd.h"
#include "breakpoint.h"
#include "language.h"
#include "complaints.h"
#include "demangle.h"
#include "inferior.h"
#include "regcache.h"
#include "filenames.h"
#include "gdbsupport/gdb_obstack.h"
#include "completer.h"
#include "bcache.h"
#include "hashtab.h"
#include "readline/tilde.h"
#include "block.h"
#include "observable.h"
#include "exec.h"
#include "parser-defs.h"
#include "varobj.h"
#include "elf-bfd.h"
#include "solib.h"
#include "remote.h"
#include "stack.h"
#include "gdb_bfd.h"
#include "cli/cli-utils.h"
#include "gdbsupport/byte-vector.h"
#include "gdbsupport/pathstuff.h"
#include "gdbsupport/selftest.h"
#include "cli/cli-style.h"
#include "gdbsupport/forward-scope-exit.h"
#include "gdbsupport/buildargv.h"
#include <sys/types.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <ctype.h>
#include <chrono>
#include <algorithm>
Go to the source code of this file.
Classes | |
struct | registered_sym_fns |
struct | load_progress_data |
struct | load_progress_section_data |
struct | load_section_data |
struct | filename_language |
Macros | |
#define | DEBUG_SUBDIRECTORY ".debug" |
#define | READNOW_READNEVER_HELP "The '-readnow' option will cause GDB to read the entire symbol file\n\immediately. This makes the command slower, but may make future operations\n\faster.\n\The '-readnever' option will prevent GDB from reading the symbol file's\n\symbolic debug information." |
Typedefs | |
using | clear_symtab_users_cleanup = FORWARD_SCOPE_EXIT (clear_symtab_users) |
Enumerations | |
enum | ovly_index { VMA , OSIZE , LMA , MAPPED } |
Functions | |
static void | symbol_file_add_main_1 (const char *args, symfile_add_flags add_flags, objfile_flags flags, CORE_ADDR reloff) |
static const struct sym_fns * | find_sym_fns (bfd *) |
static void | overlay_invalidate_all (void) |
static void | simple_free_overlay_table (void) |
static void | read_target_long_array (CORE_ADDR, unsigned int *, int, int, enum bfd_endian) |
static int | simple_read_overlay_table (void) |
static int | simple_overlay_update_1 (struct obj_section *) |
static void | symfile_find_segment_sections (struct objfile *objfile) |
int | print_symbol_loading_p (int from_tty, int exec, int full) |
scoped_restore_tmpl< int > | increment_reading_symtab (void) |
static void | find_lowest_section (asection *sect, asection **lowest) |
section_addr_info | build_section_addr_info_from_section_table (const target_section_table &table) |
static section_addr_info | build_section_addr_info_from_bfd (bfd *abfd) |
section_addr_info | build_section_addr_info_from_objfile (const struct objfile *objfile) |
static void | init_objfile_sect_indices (struct objfile *objfile) |
static void | place_section (bfd *abfd, asection *sect, section_offsets &offsets, CORE_ADDR &lowest) |
void | relative_addr_info_to_section_offsets (section_offsets §ion_offsets, const section_addr_info &addrs) |
static const char * | addr_section_name (const char *s) |
static bool | addrs_section_compar (const struct other_sections *a, const struct other_sections *b) |
static std::vector< const struct other_sections * > | addrs_section_sort (const section_addr_info &addrs) |
void | addr_info_make_relative (section_addr_info *addrs, bfd *abfd) |
void | default_symfile_offsets (struct objfile *objfile, const section_addr_info &addrs) |
symfile_segment_data_up | default_symfile_segments (bfd *abfd) |
static void | read_symbols (struct objfile *objfile, symfile_add_flags add_flags) |
static void | init_entry_point_info (struct objfile *objfile) |
static void | syms_from_objfile_1 (struct objfile *objfile, section_addr_info *addrs, symfile_add_flags add_flags) |
static void | syms_from_objfile (struct objfile *objfile, section_addr_info *addrs, symfile_add_flags add_flags) |
static void | finish_new_objfile (struct objfile *objfile, symfile_add_flags add_flags) |
static struct objfile * | symbol_file_add_with_addrs (const gdb_bfd_ref_ptr &abfd, const char *name, symfile_add_flags add_flags, section_addr_info *addrs, objfile_flags flags, struct objfile *parent) |
void | symbol_file_add_separate (const gdb_bfd_ref_ptr &bfd, const char *name, symfile_add_flags symfile_flags, struct objfile *objfile) |
struct objfile * | symbol_file_add_from_bfd (const gdb_bfd_ref_ptr &abfd, const char *name, symfile_add_flags add_flags, section_addr_info *addrs, objfile_flags flags, struct objfile *parent) |
struct objfile * | symbol_file_add (const char *name, symfile_add_flags add_flags, section_addr_info *addrs, objfile_flags flags) |
void | symbol_file_add_main (const char *args, symfile_add_flags add_flags) |
void | symbol_file_clear (int from_tty) |
static int | separate_debug_file_exists (const std::string &name, unsigned long crc, struct objfile *parent_objfile, deferred_warnings *warnings) |
static void | show_debug_file_directory (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static std::string | find_separate_debug_file (const char *dir, const char *canon_dir, const char *debuglink, unsigned long crc32, struct objfile *objfile, deferred_warnings *warnings) |
static void | terminate_after_last_dir_separator (char *path) |
std::string | find_separate_debug_file_by_debuglink (struct objfile *objfile, deferred_warnings *warnings) |
static void | validate_readnow_readnever (objfile_flags flags) |
void | symbol_file_command (const char *args, int from_tty) |
void | set_initial_language (void) |
gdb_bfd_ref_ptr | symfile_bfd_open (const char *name) |
gdb_bfd_ref_ptr | symfile_bfd_open_no_error (const char *name) noexcept |
int | get_section_index (struct objfile *objfile, const char *section_name) |
void | add_symtab_fns (enum bfd_flavour flavour, const struct sym_fns *sf) |
static void | load_command (const char *arg, int from_tty) |
static void | load_progress (ULONGEST bytes, void *untyped_arg) |
static void | load_one_section (bfd *abfd, asection *asec, struct load_section_data *args) |
static void | print_transfer_performance (struct ui_file *stream, unsigned long data_count, unsigned long write_count, std::chrono::steady_clock::duration d) |
void | generic_load (const char *args, int from_tty) |
static void | set_objfile_default_section_offset (struct objfile *objf, const section_addr_info &addrs, CORE_ADDR offset) |
static void | add_symbol_file_command (const char *args, int from_tty) |
static void | remove_symbol_file_command (const char *args, int from_tty) |
void | reread_symbols (int from_tty) |
void | add_filename_language (const char *ext, enum language lang) |
static void | show_ext_args (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
static void | set_ext_lang_command (const char *args, int from_tty, struct cmd_list_element *e) |
static void | info_ext_lang_command (const char *args, int from_tty) |
enum language | deduce_language_from_filename (const char *filename) |
struct symtab * | allocate_symtab (struct compunit_symtab *cust, const char *filename, const char *filename_for_id) |
struct compunit_symtab * | allocate_compunit_symtab (struct objfile *objfile, const char *name) |
void | add_compunit_symtab_to_objfile (struct compunit_symtab *cu) |
void | clear_symtab_users (symfile_add_flags add_flags) |
int | section_is_overlay (struct obj_section *section) |
int | section_is_mapped (struct obj_section *osect) |
bool | pc_in_unmapped_range (CORE_ADDR pc, struct obj_section *section) |
bool | pc_in_mapped_range (CORE_ADDR pc, struct obj_section *section) |
static int | sections_overlap (struct obj_section *a, struct obj_section *b) |
CORE_ADDR | overlay_unmapped_address (CORE_ADDR pc, struct obj_section *section) |
CORE_ADDR | overlay_mapped_address (CORE_ADDR pc, struct obj_section *section) |
CORE_ADDR | symbol_overlayed_address (CORE_ADDR address, struct obj_section *section) |
struct obj_section * | find_pc_overlay (CORE_ADDR pc) |
struct obj_section * | find_pc_mapped_section (CORE_ADDR pc) |
static void | list_overlays_command (const char *args, int from_tty) |
static void | map_overlay_command (const char *args, int from_tty) |
static void | unmap_overlay_command (const char *args, int from_tty) |
static void | overlay_auto_command (const char *args, int from_tty) |
static void | overlay_manual_command (const char *args, int from_tty) |
static void | overlay_off_command (const char *args, int from_tty) |
static void | overlay_load_command (const char *args, int from_tty) |
void | simple_overlay_update (struct obj_section *osect) |
bfd_byte * | default_symfile_relocate (struct objfile *objfile, asection *sectp, bfd_byte *buf) |
bfd_byte * | symfile_relocate_debug_section (struct objfile *objfile, asection *sectp, bfd_byte *buf) |
symfile_segment_data_up | get_symfile_segment_data (bfd *abfd) |
int | symfile_map_offsets_to_segments (bfd *abfd, const struct symfile_segment_data *data, section_offsets &offsets, int num_segment_bases, const CORE_ADDR *segment_bases) |
static void | symfile_free_objfile (struct objfile *objfile) |
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, enum search_domain kind) |
void | map_symbol_filenames (gdb::function_view< symbol_filename_ftype > fun, bool need_fullname) |
void | _initialize_symfile () |
#define DEBUG_SUBDIRECTORY ".debug" |
Definition at line 1366 of file symfile.c.
Referenced by find_separate_debug_file().
#define READNOW_READNEVER_HELP "The '-readnow' option will cause GDB to read the entire symbol file\n\immediately. This makes the command slower, but may make future operations\n\faster.\n\The '-readnever' option will prevent GDB from reading the symbol file's\n\symbolic debug information." |
using clear_symtab_users_cleanup = FORWARD_SCOPE_EXIT (clear_symtab_users) |
enum ovly_index |
void _initialize_symfile | ( | ) |
Definition at line 3850 of file symfile.c.
Referenced by initialize_all_files().
void add_compunit_symtab_to_objfile | ( | struct compunit_symtab * | cu | ) |
Definition at line 2894 of file symfile.c.
References objfile::compunit_symtabs, compunit_symtab::next, and compunit_symtab::objfile().
Referenced by buildsym_compunit::end_compunit_symtab_with_blockvector(), finalize_symtab(), and new_symtab().
void add_filename_language | ( | const char * | ext, |
enum language | lang ) |
Definition at line 2715 of file symfile.c.
References filename_language_table.
Referenced by add_set_language_command(), and set_ext_lang_command().
|
static |
Definition at line 2226 of file symfile.c.
References program_space::add_target_sections(), current_program_space, dont_repeat(), file_name_style, flags, gdb_printf(), get_current_arch(), objfile_per_bfd_storage::minimal_symbol_count, name, OBJF_READNEVER, OBJF_READNOW, OBJF_SHARED, OBJF_USERLOADED, objfile_has_symbols(), paddress(), parse_and_eval_address(), objfile::per_bfd, query(), reinit_frame_cache(), set_objfile_default_section_offset(), cli_style_option::style(), styled_string(), symbol_file_add(), SYMFILE_VERBOSE, validate_readnow_readnever(), and value.
void add_symtab_fns | ( | enum bfd_flavour | flavour, |
const struct sym_fns * | sf ) |
Definition at line 1804 of file symfile.c.
References symtab_fns.
Referenced by _initialize_machoread(), and _initialize_xcoffread().
void addr_info_make_relative | ( | section_addr_info * | addrs, |
bfd * | abfd ) |
Definition at line 483 of file symfile.c.
References other_sections::addr, addr_section_name(), addrs_section_sort(), build_section_addr_info_from_bfd(), find_lowest_section(), gdb_bfd_sections(), name, and other_sections::sectindex.
Referenced by objfile_relocate(), and syms_from_objfile_1().
|
static |
Definition at line 434 of file symfile.c.
Referenced by addr_info_make_relative(), addrs_section_compar(), and set_objfile_default_section_offset().
|
static |
Definition at line 449 of file symfile.c.
References addr_section_name(), other_sections::name, and other_sections::sectindex.
Referenced by addrs_section_sort().
|
static |
Definition at line 465 of file symfile.c.
References addrs_section_compar().
Referenced by addr_info_make_relative(), and set_objfile_default_section_offset().
struct compunit_symtab * allocate_compunit_symtab | ( | struct objfile * | objfile, |
const char * | name ) |
Definition at line 2868 of file symfile.c.
References name, compunit_symtab::name, objfile::objfile_obstack, compunit_symtab::set_debugformat(), compunit_symtab::set_objfile(), and symtab_create_debug_printf_v.
Referenced by buildsym_compunit::buildsym_compunit(), finalize_symtab(), and new_symtab().
struct symtab * allocate_symtab | ( | struct compunit_symtab * | cust, |
const char * | filename, | ||
const char * | filename_for_id ) |
Definition at line 2821 of file symfile.c.
References compunit_symtab::add_filetab(), deduce_language_from_filename(), symtab::filename, symtab::filename_for_id, symtab::fullname, objfile::intern(), compunit_symtab::objfile(), objfile_name(), objfile::objfile_obstack, symtab::set_compunit(), symtab::set_language(), symtab_create_debug, and symtab_create_debug_printf_v.
Referenced by allocate_symtab(), dwarf_decode_lines(), buildsym_compunit::end_compunit_symtab_with_blockvector(), finalize_symtab(), new_symtab(), and dwarf2_cu::setup_type_unit_groups().
|
static |
Definition at line 240 of file symfile.c.
References gdb_bfd_section_index().
Referenced by addr_info_make_relative(), and build_section_addr_info_from_objfile().
section_addr_info build_section_addr_info_from_objfile | ( | const struct objfile * | objfile | ) |
Definition at line 257 of file symfile.c.
References build_section_addr_info_from_bfd(), objfile::obfd, and objfile::section_offsets.
Referenced by objfile_relocate(), set_objfile_default_section_offset(), and symbol_file_add_separate().
section_addr_info build_section_addr_info_from_section_table | ( | const target_section_table & | table | ) |
Definition at line 218 of file symfile.c.
References gdb_bfd_section_index().
Referenced by solib_read_symbols().
void clear_symtab_users | ( | symfile_add_flags | add_flags | ) |
Definition at line 2905 of file symfile.c.
References gdb::observers::all_objfiles_removed, breakpoint_re_set(), clear_current_source_symtab_and_line(), clear_displays(), clear_last_displayed_sal(), clear_pc_function_cache(), current_program_space, and SYMFILE_DEFER_BP_RESET.
Referenced by do_module_cleanup(), finish_new_objfile(), remove_symbol_file_command(), reread_symbols(), symbol_file_clear(), and program_space::~program_space().
enum language deduce_language_from_filename | ( | const char * | filename | ) |
Definition at line 2802 of file symfile.c.
References filename_language_table, and language_unknown.
Referenced by allocate_symtab(), parse_partial_symbols(), buildsym_compunit::patch_subfile_names(), read_dbx_symtab(), read_xcoff_symtab(), scan_xcoff_symtab(), start_psymtab(), buildsym_compunit::start_subfile(), and xcoff_start_psymtab().
void default_symfile_offsets | ( | struct objfile * | objfile, |
const section_addr_info & | addrs ) |
Definition at line 625 of file symfile.c.
References exec_set_section_address(), gdb_bfd_count_sections(), gdb_bfd_sections(), init_objfile_sect_indices(), objfile::obfd, place_section(), relative_addr_info_to_section_offsets(), and objfile::section_offsets.
Referenced by xcoff_symfile_offsets().
bfd_byte * default_symfile_relocate | ( | struct objfile * | objfile, |
asection * | sectp, | ||
bfd_byte * | buf ) |
Definition at line 3595 of file symfile.c.
References gdb_bfd_sections().
symfile_segment_data_up default_symfile_segments | ( | bfd * | abfd | ) |
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, | ||
enum search_domain | kind ) |
Definition at line 3759 of file symfile.c.
References current_program_space, objfile::expand_symtabs_matching(), program_space::objfiles(), and UNDEF_DOMAIN.
Referenced by ada_add_global_exceptions(), ada_language::collect_symbol_completion_matches(), default_collect_symbol_completion_matches_break_on(), and gdbpy_lookup_static_symbols().
|
static |
Definition at line 201 of file symfile.c.
Referenced by addr_info_make_relative().
struct obj_section * find_pc_mapped_section | ( | CORE_ADDR | pc | ) |
Definition at line 3203 of file symfile.c.
References current_program_space, program_space::objfiles(), overlay_debugging, pc_in_mapped_range(), section_is_mapped(), and objfile::sections().
Referenced by block_for_pc(), blockvector_for_pc(), find_pc_compunit_symtab(), find_pc_function(), find_pc_section(), and jump_command().
struct obj_section * find_pc_overlay | ( | CORE_ADDR | pc | ) |
Definition at line 3174 of file symfile.c.
References current_program_space, program_space::objfiles(), overlay_debugging, pc_in_mapped_range(), pc_in_unmapped_range(), section_is_mapped(), section_is_overlay(), and objfile::sections().
Referenced by amd_dbgapi_target_breakpoint::amd_dbgapi_target_breakpoint(), arm_linux_copy_svc(), build_address_symbolic(), call_function_by_hand_dummy(), convert_address_location_to_sals(), elf_gnu_ifunc_resolver_stop(), find_pc_line(), find_pc_partial_function_sym(), handle_step_into_function(), insert_hp_step_resume_breakpoint_at_frame(), insert_single_step_breakpoint(), insert_step_resume_breakpoint_at_caller(), internal_breakpoint::internal_breakpoint(), memory_xfer_partial_1(), parse_probes_in_pspace(), process_event_stop_test(), and set_momentary_breakpoint_at_pc().
|
static |
Definition at line 1384 of file symfile.c.
References debug_file_directory, DEBUG_SUBDIRECTORY, gdb_printf(), gdb_stdlog, gdb_sysroot, objfile_name(), separate_debug_file_debug, and separate_debug_file_exists().
Referenced by find_separate_debug_file_by_debuglink().
std::string find_separate_debug_file_by_debuglink | ( | struct objfile * | objfile, |
deferred_warnings * | warnings ) |
Definition at line 1533 of file symfile.c.
References find_separate_debug_file(), objfile::obfd, objfile_name(), and terminate_after_last_dir_separator().
Referenced by coff_symfile_read(), and elf_symfile_read_dwarf2().
|
static |
Definition at line 1815 of file symfile.c.
References symtab_fns.
Referenced by get_symfile_segment_data(), reread_symbols(), and syms_from_objfile_1().
|
static |
Definition at line 991 of file symfile.c.
References breakpoint_re_set(), clear_complaints(), clear_symtab_users(), current_program_space, SYMFILE_DEFER_BP_RESET, SYMFILE_MAINLINE, and program_space::symfile_object_file.
Referenced by symbol_file_add_with_addrs().
void generic_load | ( | const char * | args, |
int | from_tty ) |
Definition at line 2037 of file symfile.c.
References breakpoint_re_set(), current_uiout, load_progress_data::data_count, error_no_arg(), ui_out::field_core_addr(), ui_out::field_unsigned(), flash_discard, gdb_bfd_open(), gdb_bfd_sections(), gdb_stdout, gdbarch_addr_bits_remove(), get_current_regcache(), gnutarget, load_section_data::load_offset, load_one_section(), load_progress(), print_transfer_performance(), regcache_write_pc(), load_section_data::requests, target_gdbarch(), target_write_memory_blocks(), ui_out::text(), load_progress_data::total_size, and load_progress_data::write_count.
Referenced by remote_target::load().
int get_section_index | ( | struct objfile * | objfile, |
const char * | section_name ) |
Definition at line 1787 of file symfile.c.
References objfile::obfd.
Referenced by parse_partial_symbols(), and record_minimal_symbol().
symfile_segment_data_up get_symfile_segment_data | ( | bfd * | abfd | ) |
Definition at line 3642 of file symfile.c.
References find_sym_fns(), and sym_fns::sym_segments.
Referenced by remote_target::get_offsets(), solib_target_relocate_section_addresses(), and symfile_find_segment_sections().
scoped_restore_tmpl< int > increment_reading_symtab | ( | void | ) |
Definition at line 185 of file symfile.c.
References currently_reading_symtab.
Referenced by dw2_instantiate_symtab(), and psymtab_to_symtab().
|
static |
Definition at line 2792 of file symfile.c.
References filename_language_table, gdb_printf(), and language_str().
|
static |
Definition at line 799 of file symfile.c.
References objfile::arch(), current_inferior(), objfile_per_bfd_storage::ei, entry_info::entry_point, entry_info::entry_point_p, gdb_bfd_section_index(), gdbarch_addr_bits_remove(), gdbarch_convert_from_func_ptr_addr(), entry_info::initialized, objfile::obfd, objfile::per_bfd, SECT_OFF_TEXT, objfile::sections(), and entry_info::the_bfd_section_index.
Referenced by reread_symbols(), and syms_from_objfile().
|
static |
Definition at line 278 of file symfile.c.
References objfile::obfd, objfile::sect_index_bss, objfile::sect_index_data, objfile::sect_index_rodata, objfile::sect_index_text, objfile::section_offsets, and symfile_find_segment_sections().
Referenced by default_symfile_offsets().
|
static |
Definition at line 3220 of file symfile.c.
References objfile::arch(), current_program_space, gdb_printf(), gdb_puts(), name, program_space::objfiles(), overlay_debugging, paddress(), section_is_mapped(), objfile::sections(), and size.
|
static |
Definition at line 1836 of file symfile.c.
References dont_repeat(), get_exec_file(), overlay_cache_invalid, reopen_exec_file(), reread_symbols(), and target_load().
|
static |
Definition at line 2005 of file symfile.c.
References size, and xmalloc().
Referenced by generic_load().
|
static |
Definition at line 1941 of file symfile.c.
References check(), check_quit_flag(), current_uiout, load_progress_data::data_count, deprecated_show_load_progress, deprecated_ui_load_progress_hook, paddress(), target_gdbarch(), target_read_memory(), load_progress_data::total_size, validate_download, and load_progress_data::write_count.
Referenced by generic_load().
|
static |
Definition at line 3261 of file symfile.c.
References current_program_space, gdb_printf(), info_verbose, program_space::objfiles(), overlay_debugging, section_is_overlay(), and sections_overlap().
void map_symbol_filenames | ( | gdb::function_view< symbol_filename_ftype > | fun, |
bool | need_fullname ) |
Definition at line 3784 of file symfile.c.
References current_program_space, objfile::map_symbol_filenames(), and program_space::objfiles().
Referenced by info_sources_worker(), and make_source_files_completion_list().
|
static |
Definition at line 3333 of file symfile.c.
References enable_overlay_breakpoints(), gdb_printf(), info_verbose, overlay_debugging, and ovly_auto.
|
static |
Definition at line 3001 of file symfile.c.
References current_program_space, program_space::objfiles(), section_is_overlay(), and objfile::sections().
Referenced by section_is_mapped().
|
static |
Definition at line 3368 of file symfile.c.
References gdbarch_overlay_update(), gdbarch_overlay_update_p(), and get_current_arch().
|
static |
Definition at line 3346 of file symfile.c.
References disable_overlay_breakpoints(), gdb_printf(), info_verbose, overlay_debugging, and ovly_on.
CORE_ADDR overlay_mapped_address | ( | CORE_ADDR | pc, |
struct obj_section * | section ) |
Definition at line 3126 of file symfile.c.
References pc_in_unmapped_range(), section_is_overlay(), and obj_section::the_bfd_section.
Referenced by build_address_symbolic(), find_pc_line(), find_pc_partial_function_sym(), info_symbol_command(), memory_xfer_partial_1(), and skip_prologue_sal().
|
static |
Definition at line 3359 of file symfile.c.
References disable_overlay_breakpoints(), gdb_printf(), info_verbose, overlay_debugging, and ovly_off.
CORE_ADDR overlay_unmapped_address | ( | CORE_ADDR | pc, |
struct obj_section * | section ) |
Definition at line 3108 of file symfile.c.
References pc_in_mapped_range(), section_is_overlay(), and obj_section::the_bfd_section.
Referenced by find_pc_line(), find_pc_partial_function_sym(), info_address_command(), insert_bp_location(), skip_prologue_sal(), and symbol_overlayed_address().
bool pc_in_mapped_range | ( | CORE_ADDR | pc, |
struct obj_section * | section ) |
Definition at line 3077 of file symfile.c.
References obj_section::addr(), and section_is_overlay().
Referenced by find_pc_mapped_section(), find_pc_overlay(), and overlay_unmapped_address().
bool pc_in_unmapped_range | ( | CORE_ADDR | pc, |
struct obj_section * | section ) |
Definition at line 3055 of file symfile.c.
References obj_section::offset(), section_is_overlay(), size, and obj_section::the_bfd_section.
Referenced by build_address_symbolic(), find_pc_line(), find_pc_overlay(), find_pc_partial_function_sym(), info_symbol_command(), memory_xfer_partial_1(), and overlay_mapped_address().
|
static |
Definition at line 340 of file symfile.c.
References gdb_bfd_section_index().
Referenced by default_symfile_offsets().
int print_symbol_loading_p | ( | int | from_tty, |
int | exec, | ||
int | full ) |
Definition at line 161 of file symfile.c.
References info_verbose, print_symbol_loading, print_symbol_loading_brief, print_symbol_loading_full, and print_symbol_loading_off.
Referenced by reload_shared_libraries_1(), reread_symbols(), solib_add(), and symbol_file_add_with_addrs().
|
static |
Definition at line 2123 of file symfile.c.
References current_uiout, ui_out::field_unsigned(), ui_out::is_mi_like_p(), rate, and ui_out::text().
Referenced by generic_load().
|
static |
Definition at line 769 of file symfile.c.
References find_separate_debug_file_in_section(), objfile::has_partial_symbols(), objfile_per_bfd_storage::minsyms_read, objfile::per_bfd, objfile::require_partial_symbols(), objfile::separate_debug_objfile, objfile::separate_debug_objfile_backlink, objfile::sf, sym_fns::sym_read, symbol_file_add_separate(), SYMFILE_NO_READ, and SYMFILE_NOT_FILENAME.
Referenced by reread_symbols(), and syms_from_objfile_1().
|
static |
Definition at line 3438 of file symfile.c.
References extract_unsigned_integer(), read_memory(), and size.
Referenced by simple_overlay_update_1(), and simple_read_overlay_table().
void relative_addr_info_to_section_offsets | ( | section_offsets & | section_offsets, |
const section_addr_info & | addrs ) |
Definition at line 404 of file symfile.c.
References other_sections::addr, and other_sections::sectindex.
Referenced by default_symfile_offsets(), and objfile_relocate().
|
static |
Definition at line 2383 of file symfile.c.
References clear_symtab_users(), current_program_space, dont_repeat(), objfile::flags, is_addr_in_objfile(), OBJF_SHARED, OBJF_USERLOADED, objfile_name(), program_space::objfiles(), parse_and_eval_address(), objfile::pspace, query(), and objfile::unlink().
void reread_symbols | ( | int | from_tty | ) |
Definition at line 2457 of file symfile.c.
References build_objfile_section_table(), clear_complaints(), registry< T >::clear_registry(), clear_symtab_users(), objfile::compunit_symtabs, current_program_space, objfile::expand_all_symtabs(), file_name_style, find_sym_fns(), objfile::flags, forget_cached_source_info(), free_objfile_separate_debug(), gdb_bfd_open(), gdb_printf(), gdb_stdout, gnutarget, init_entry_point_info(), objfile::mtime, gdb::observers::new_objfile, notify, objfile::obfd, OBJF_MAINLINE, OBJF_READNOW, objfile_has_symbols(), objfile_name(), objfile::objfile_obstack, objfile_set_sym_fns(), program_space::objfiles(), objfiles_changed(), objfile::original_name, preserve_values(), print_symbol_loading_p(), objfile::qf, read_symbols(), readnow_symbol_files, objfile::registry_fields, reinit_frame_cache(), reopen_exec_file(), objfile::sect_index_bss, objfile::sect_index_data, objfile::sect_index_rodata, objfile::sect_index_text, objfile::section_offsets, objfile::sections_start, objfile::separate_debug_objfile_backlink, set_objfile_per_bfd(), objfile::sf, objfile::static_links, cli_style_option::style(), styled_string(), sym_fns::sym_finish, sym_fns::sym_init, sym_fns::sym_new_init, sym_fns::sym_offsets, program_space::symfile_object_file, and objfile::template_symbols.
Referenced by load_command(), remote_target::open_1(), run_command_1(), and setup_inferior().
int section_is_mapped | ( | struct obj_section * | osect | ) |
Definition at line 3019 of file symfile.c.
References objfile::arch(), gdbarch_overlay_update(), gdbarch_overlay_update_p(), obj_section::objfile, overlay_cache_invalid, overlay_debugging, overlay_invalidate_all(), ovly_auto, obj_section::ovly_mapped, ovly_off, ovly_on, and section_is_overlay().
Referenced by bp_location_inserted_here_p(), breakpoint_here_p(), code_breakpoint::breakpoint_hit(), breakpoint_in_range_p(), find_pc_mapped_section(), find_pc_overlay(), info_symbol_command(), insert_bp_location(), is_addr_in_objfile(), jump_command(), list_overlays_command(), remove_breakpoint_1(), skip_prologue_sal(), and symbol_overlayed_address().
int section_is_overlay | ( | struct obj_section * | section | ) |
Definition at line 2983 of file symfile.c.
References overlay_debugging, and obj_section::the_bfd_section.
Referenced by bp_location_inserted_here_p(), breakpoint_here_p(), code_breakpoint::breakpoint_hit(), breakpoint_in_range_p(), clear_command(), find_pc_overlay(), info_address_command(), info_symbol_command(), insert_bp_location(), is_addr_in_objfile(), jump_command(), map_overlay_command(), overlay_invalidate_all(), overlay_mapped_address(), overlay_unmapped_address(), pc_in_mapped_range(), pc_in_unmapped_range(), remove_breakpoint_1(), section_is_mapped(), simple_overlay_update(), skip_prologue_sal(), symbol_overlayed_address(), z80_overlay_update(), and z80_overlay_update_1().
|
static |
Definition at line 3093 of file symfile.c.
References obj_section::addr(), and obj_section::endaddr().
Referenced by map_overlay_command().
|
static |
Definition at line 1238 of file symfile.c.
References file_name_style, gdb_bfd_crc(), gdb_bfd_open(), gdb_flush(), gdb_printf(), gdb_stdlog, gnutarget, name, objfile::obfd, objfile_name(), separate_debug_file_debug, cli_style_option::style(), styled_string(), and deferred_warnings::warn().
Referenced by find_separate_debug_file().
|
static |
Definition at line 2733 of file symfile.c.
References add_filename_language(), ext_args, filename_language_table, and language_enum().
void set_initial_language | ( | void | ) |
Definition at line 1690 of file symfile.c.
References current_language, expected_language, general_symbol_info::language(), language_c, language_mode_manual, language_unknown, lookup_symbol_in_language(), main_language(), main_name(), name, set_language(), block_symbol::symbol, and VAR_DOMAIN.
Referenced by set_language(), and symbol_file_add_main_1().
|
static |
Definition at line 2172 of file symfile.c.
References addr_section_name(), addrs_section_sort(), build_section_addr_info_from_objfile(), other_sections::name, objfile_relocate(), and objfile::section_offsets.
Referenced by add_symbol_file_command().
|
static |
Definition at line 1356 of file symfile.c.
References gdb_printf().
|
static |
Definition at line 2723 of file symfile.c.
References gdb_printf().
|
static |
Definition at line 3426 of file symfile.c.
References cache_novlys, cache_ovly_table, cache_ovly_table_base, and xfree().
Referenced by simple_read_overlay_table().
void simple_overlay_update | ( | struct obj_section * | osect | ) |
Definition at line 3542 of file symfile.c.
References cache_novlys, cache_ovly_table, cache_ovly_table_base, current_program_space, LMA, lookup_minimal_symbol(), MAPPED, bound_minimal_symbol::minsym, program_space::objfiles(), section_is_overlay(), objfile::sections(), simple_overlay_update_1(), simple_read_overlay_table(), minimal_symbol::value_address(), and VMA.
Referenced by csky_gdbarch_init(), ft32_gdbarch_init(), m32r_gdbarch_init(), and moxie_gdbarch_init().
|
static |
Definition at line 3506 of file symfile.c.
References objfile::arch(), cache_novlys, cache_ovly_table, cache_ovly_table_base, gdbarch_byte_order(), gdbarch_long_bit(), LMA, MAPPED, obj_section::objfile, obj_section::ovly_mapped, read_target_long_array(), obj_section::the_bfd_section, and VMA.
Referenced by simple_overlay_update().
|
static |
Definition at line 3454 of file symfile.c.
References objfile::arch(), cache_novlys, cache_ovly_table, cache_ovly_table_base, gdbarch_byte_order(), gdbarch_long_bit(), lookup_bound_minimal_symbol(), lookup_minimal_symbol(), bound_minimal_symbol::minsym, bound_minimal_symbol::objfile, read_memory_integer(), read_target_long_array(), simple_free_overlay_table(), bound_minimal_symbol::value_address(), and xmalloc().
Referenced by simple_overlay_update().
struct objfile * symbol_file_add | ( | const char * | name, |
symfile_add_flags | add_flags, | ||
section_addr_info * | addrs, | ||
objfile_flags | flags ) |
Definition at line 1168 of file symfile.c.
References flags, name, symbol_file_add_from_bfd(), and symfile_bfd_open().
Referenced by add_symbol_file_command(), and symbol_file_add_main_1().
struct objfile * symbol_file_add_from_bfd | ( | const gdb_bfd_ref_ptr & | abfd, |
const char * | name, | ||
symfile_add_flags | add_flags, | ||
section_addr_info * | addrs, | ||
objfile_flags | flags, | ||
struct objfile * | parent ) |
Definition at line 1155 of file symfile.c.
References flags, name, and symbol_file_add_with_addrs().
Referenced by compile_object_load(), jit_bfd_try_read_symtab(), macho_add_oso_symfile(), solib_read_symbols(), symbol_file_add(), and symbol_file_add_from_memory().
void symbol_file_add_main | ( | const char * | args, |
symfile_add_flags | add_flags ) |
Definition at line 1186 of file symfile.c.
References symbol_file_add_main_1().
Referenced by add_inferior_command(), clone_program_space(), locate_exec_from_corefile_build_id(), open_symbol_file_object(), symbol_file_add_main_adapter(), try_open_exec_file(), and validate_exec_file().
|
static |
Definition at line 1192 of file symfile.c.
References current_inferior(), flags, objfile_rebase(), reinit_frame_cache(), set_initial_language(), symbol_file_add(), inferior::symfile_flags, SYMFILE_MAINLINE, and SYMFILE_NO_READ.
Referenced by symbol_file_add_main(), and symbol_file_command().
void symbol_file_add_separate | ( | const gdb_bfd_ref_ptr & | bfd, |
const char * | name, | ||
symfile_add_flags | symfile_flags, | ||
struct objfile * | objfile ) |
Definition at line 1134 of file symfile.c.
References build_section_addr_info_from_objfile(), objfile::flags, name, OBJF_MAINLINE, OBJF_READNOW, OBJF_SHARED, OBJF_USERLOADED, and symbol_file_add_with_addrs().
Referenced by coff_symfile_read(), elf_symfile_read_dwarf2(), macho_symfile_read(), objfpy_add_separate_debug_file(), and read_symbols().
|
static |
Definition at line 1033 of file symfile.c.
References deprecated_post_add_symbol_hook, deprecated_pre_add_symbol_hook, objfile::expand_all_symtabs(), file_name_style, finish_new_objfile(), flags, objfile::flags, gdb_flush(), gdb_printf(), gdb_stdout, have_full_symbols(), have_partial_symbols(), objfile::make(), name, gdb::observers::new_objfile, OBJF_MAINLINE, OBJF_NOT_FILENAME, OBJF_READNEVER, OBJF_READNOW, objfile::objfile(), objfile_has_symbols(), print_symbol_loading_p(), query(), readnever_symbol_files, readnow_symbol_files, objfile::separate_debug_objfile, objfile::sf, cli_style_option::style(), styled_string(), SYMFILE_ALWAYS_CONFIRM, SYMFILE_MAINLINE, SYMFILE_NO_READ, SYMFILE_NOT_FILENAME, SYMFILE_VERBOSE, and syms_from_objfile().
Referenced by symbol_file_add_from_bfd(), and symbol_file_add_separate().
void symbol_file_clear | ( | int | from_tty | ) |
Definition at line 1210 of file symfile.c.
References clear_symtab_users(), current_program_space, program_space::free_all_objfiles(), gdb_printf(), have_full_symbols(), have_partial_symbols(), no_shared_libraries(), objfile_name(), query(), and program_space::symfile_object_file.
Referenced by symbol_file_command().
void symbol_file_command | ( | const char * | args, |
int | from_tty ) |
Definition at line 1614 of file symfile.c.
References breakpoint_re_set(), dont_repeat(), flags, name, OBJF_READNEVER, OBJF_READNOW, OBJF_USERLOADED, parse_and_eval_address(), solib_create_inferior_hook(), symbol_file_add_main_1(), symbol_file_clear(), SYMFILE_DEFER_BP_RESET, SYMFILE_VERBOSE, validate_readnow_readnever(), and varobj_re_set().
Referenced by file_command().
CORE_ADDR symbol_overlayed_address | ( | CORE_ADDR | address, |
struct obj_section * | section ) |
Definition at line 3144 of file symfile.c.
References overlay_debugging, overlay_unmapped_address(), section_is_mapped(), and section_is_overlay().
Referenced by find_minsym_type_and_address(), and language_defn::read_var_value().
gdb_bfd_ref_ptr symfile_bfd_open | ( | const char * | name | ) |
Definition at line 1724 of file symfile.c.
References gdb_bfd_open(), gnutarget, is_target_filename(), name, O_BINARY, openp(), OPF_RETURN_REALPATH, and OPF_TRY_CWD_FIRST.
Referenced by coff_symfile_read(), objfpy_add_separate_debug_file(), symbol_file_add(), and symfile_bfd_open_no_error().
|
noexcept |
Definition at line 1769 of file symfile.c.
References err, name, and symfile_bfd_open().
Referenced by elf_symfile_read_dwarf2().
|
static |
Definition at line 3709 of file symfile.c.
References get_symfile_segment_data(), objfile::obfd, objfile::sect_index_bss, objfile::sect_index_data, objfile::sect_index_rodata, and objfile::sect_index_text.
Referenced by init_objfile_sect_indices().
|
static |
Definition at line 3748 of file symfile.c.
References objfile::pspace, and program_space::remove_target_sections().
int symfile_map_offsets_to_segments | ( | bfd * | abfd, |
const struct symfile_segment_data * | data, | ||
section_offsets & | offsets, | ||
int | num_segment_bases, | ||
const CORE_ADDR * | segment_bases ) |
Definition at line 3668 of file symfile.c.
Referenced by remote_target::get_offsets(), and solib_target_relocate_section_addresses().
bfd_byte * symfile_relocate_debug_section | ( | struct objfile * | objfile, |
asection * | sectp, | ||
bfd_byte * | buf ) |
Definition at line 3633 of file symfile.c.
References bound_minimal_symbol::objfile, objfile::sf, and sym_fns::sym_relocate.
Referenced by dbx_read_symtab(), elfstab_build_psymtabs(), and dwarf2_section_info::read().
|
static |
Definition at line 978 of file symfile.c.
References init_entry_point_info(), and syms_from_objfile_1().
Referenced by symbol_file_add_with_addrs().
|
static |
Definition at line 893 of file symfile.c.
References addr_info_make_relative(), clear_complaints(), current_program_space, find_sym_fns(), gdb_bfd_count_sections(), objfile::obfd, objfile_set_sym_fns(), objfile::qf, read_symbols(), objfile::section_offsets, objfile::sf, sym_fns::sym_init, sym_fns::sym_new_init, sym_fns::sym_offsets, SYMFILE_MAINLINE, program_space::symfile_object_file, and objfile::unlink().
Referenced by syms_from_objfile().
|
static |
Definition at line 1516 of file symfile.c.
Referenced by find_separate_debug_file_by_debuglink().
|
static |
Definition at line 3305 of file symfile.c.
References current_program_space, program_space::objfiles(), overlay_debugging, and objfile::sections().
|
static |
Definition at line 1593 of file symfile.c.
References flags, OBJF_READNEVER, and OBJF_READNOW.
bool auto_solib_add = true |
Definition at line 149 of file symfile.c.
Referenced by enable_break(), handle_solib_event(), post_create_inferior(), reload_shared_libraries(), reload_shared_libraries_1(), rocm_solib_target_inferior_created(), remote_target::start_remote_1(), and svr4_fetch_objfile_link_map().
|
static |
Definition at line 3416 of file symfile.c.
Referenced by simple_free_overlay_table(), simple_overlay_update(), simple_overlay_update_1(), and simple_read_overlay_table().
|
static |
Definition at line 3415 of file symfile.c.
Referenced by simple_free_overlay_table(), simple_overlay_update(), simple_overlay_update_1(), and simple_read_overlay_table().
|
static |
Definition at line 3417 of file symfile.c.
Referenced by simple_free_overlay_table(), simple_overlay_update(), simple_overlay_update_1(), and simple_read_overlay_table().
int currently_reading_symtab = 0 |
Definition at line 179 of file symfile.c.
Referenced by check_typedef(), and increment_reading_symtab().
std::string debug_file_directory |
Search path for separate debug files.
Definition at line 1354 of file symfile.c.
Referenced by auto_load_expand_dir_vars(), build_id_to_bfd_suffix(), captured_main_1(), dwz_search_other_debugdirs(), find_separate_debug_file(), open_dwo_file(), open_dwp_file(), and try_open_dwop_file().
void(* deprecated_post_add_symbol_hook) (void) | ( | void | ) |
Definition at line 80 of file symfile.c.
Referenced by symbol_file_add_with_addrs().
void(* deprecated_pre_add_symbol_hook) (const char *) | ( | const char * | ) |
Definition at line 79 of file symfile.c.
Referenced by symbol_file_add_with_addrs().
void(* deprecated_show_load_progress) (const char *section, unsigned long section_sent, unsigned long section_size, unsigned long total_sent, unsigned long total_size) | ( | const char * | section, |
unsigned long | section_sent, | ||
unsigned long | section_size, | ||
unsigned long | total_sent, | ||
unsigned long | total_size ) |
Definition at line 74 of file symfile.c.
Referenced by load_progress(), and mi_interp::resume().
int(* deprecated_ui_load_progress_hook) (const char *section, unsigned long num) | ( | const char * | section, |
unsigned long | num ) |
Definition at line 72 of file symfile.c.
Referenced by load_progress().
|
static |
Definition at line 2721 of file symfile.c.
Referenced by set_ext_lang_command().
|
static |
Definition at line 2710 of file symfile.c.
Referenced by add_filename_language(), deduce_language_from_filename(), info_ext_lang_command(), and set_ext_lang_command().
int overlay_cache_invalid = 0 |
Definition at line 2976 of file symfile.c.
Referenced by fetch_inferior_event(), load_command(), poll_one_curr_target(), section_is_mapped(), and wait_for_inferior().
enum overlay_debugging_state overlay_debugging = ovly_off |
Definition at line 2975 of file symfile.c.
Referenced by bp_location_inserted_here_p(), breakpoint_has_pc(), breakpoint_here_p(), code_breakpoint::breakpoint_hit(), breakpoint_in_range_p(), build_address_symbolic(), create_overlay_event_breakpoint(), find_minsym_type_and_address(), find_pc_mapped_section(), find_pc_overlay(), insert_bp_location(), insert_section_p(), list_overlays_command(), maint_agent_command_1(), maint_agent_printf_command(), map_overlay_command(), memory_xfer_partial_1(), overlay_auto_command(), overlay_manual_command(), overlay_off_command(), language_defn::read_var_value(), remove_breakpoint_1(), section_is_mapped(), section_is_overlay(), symbol_overlayed_address(), unmap_overlay_command(), update_global_location_list(), and z80_read_overlay_region_table().
|
static |
|
static |
Definition at line 145 of file symfile.c.
Referenced by print_symbol_loading_p().
const char print_symbol_loading_brief[] = "brief" |
Definition at line 136 of file symfile.c.
Referenced by print_symbol_loading_p().
|
static |
const char print_symbol_loading_full[] = "full" |
Definition at line 137 of file symfile.c.
Referenced by print_symbol_loading_p().
const char print_symbol_loading_off[] = "off" |
Definition at line 135 of file symfile.c.
Referenced by print_symbol_loading_p().
int readnever_symbol_files |
Definition at line 92 of file symfile.c.
Referenced by captured_main_1(), symbol_file_add_with_addrs(), and validate_readnow_readnever().
int readnow_symbol_files |
Definition at line 88 of file symfile.c.
Referenced by captured_main_1(), reread_symbols(), symbol_file_add_with_addrs(), and validate_readnow_readnever().
bool separate_debug_file_debug = false |
Definition at line 1235 of file symfile.c.
Referenced by build_id_to_debug_bfd_1(), find_separate_debug_file(), find_separate_debug_file_by_buildid(), and separate_debug_file_exists().
|
static |
Definition at line 131 of file symfile.c.
Referenced by add_symtab_fns(), and find_sym_fns().
|
static |
Definition at line 1886 of file symfile.c.
Referenced by load_progress().