GDB (xrefs)
|
#include "symtab.h"
#include "probe.h"
#include "symfile-add-flags.h"
#include "objfile-flags.h"
#include "gdb_bfd.h"
#include "gdbsupport/function-view.h"
#include "target-section.h"
#include "quick-symbol.h"
Go to the source code of this file.
Classes | |
struct | other_sections |
struct | symfile_segment_data |
struct | symfile_segment_data::segment |
struct | sym_probe_fns |
struct | sym_fns |
Typedefs | |
typedef std::vector< other_sections > | section_addr_info |
using | symfile_segment_data_up = std::unique_ptr< symfile_segment_data > |
Enumerations | |
enum | overlay_debugging_state { ovly_off , ovly_on , ovly_auto } |
Variables | |
bool | auto_solib_add |
enum overlay_debugging_state | overlay_debugging |
int | overlay_cache_invalid |
bool | separate_debug_file_debug |
int | readnow_symbol_files |
int | readnever_symbol_files |
typedef std::vector<other_sections> section_addr_info |
using symfile_segment_data_up = std::unique_ptr<symfile_segment_data> |
void add_compunit_symtab_to_objfile | ( | struct compunit_symtab * | cu | ) |
Definition at line 2851 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 2672 of file symfile.c.
References filename_language_table.
Referenced by add_set_language_command(), and set_ext_lang_command().
void add_symtab_fns | ( | enum bfd_flavour | flavour, |
const struct sym_fns * | sf | ||
) |
Definition at line 1768 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 485 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().
struct compunit_symtab * allocate_compunit_symtab | ( | struct objfile * | objfile, |
const char * | name | ||
) |
Definition at line 2825 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().
|
inlinestatic |
Definition at line 211 of file symfile.h.
References allocate_symtab(), and symtab::filename.
struct symtab * allocate_symtab | ( | struct compunit_symtab * | cust, |
const char * | filename, | ||
const char * | id | ||
) |
Definition at line 2778 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().
section_addr_info build_section_addr_info_from_objfile | ( | const struct objfile * | objfile | ) |
Definition at line 259 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 220 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 2862 of file symfile.c.
References breakpoint_re_set(), clear_current_source_symtab_and_line(), clear_displays(), clear_last_displayed_sal(), clear_pc_function_cache(), gdb::observers::new_objfile, 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 2759 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 627 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 3561 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 3726 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().
struct obj_section * find_pc_mapped_section | ( | CORE_ADDR | pc | ) |
Definition at line 3162 of file symfile.c.
References ALL_OBJFILE_OSECTIONS, current_program_space, program_space::objfiles(), overlay_debugging, pc_in_mapped_range(), and section_is_mapped().
Referenced by block_for_pc(), blockvector_for_pc(), find_pc_compunit_symtab(), find_pc_function(), and find_pc_section().
struct obj_section * find_pc_overlay | ( | CORE_ADDR | pc | ) |
Definition at line 3133 of file symfile.c.
References ALL_OBJFILE_OSECTIONS, current_program_space, program_space::objfiles(), overlay_debugging, pc_in_mapped_range(), pc_in_unmapped_range(), section_is_mapped(), and section_is_overlay().
Referenced by 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().
std::string find_separate_debug_file_by_debuglink | ( | struct objfile * | objfile | ) |
Definition at line 1514 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().
gdb_bfd_ref_ptr find_separate_debug_file_in_section | ( | struct objfile * | objfile | ) |
Definition at line 263 of file minidebug.c.
References gdb_bfd_openr_iovec(), registry< T >::get(), gnutarget, objfile::obfd, and objfile_name().
Referenced by read_symbols().
void generic_load | ( | const char * | args, |
int | from_tty | ||
) |
Definition at line 2001 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(), perror_with_name(), 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 1751 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 3608 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 187 of file symfile.c.
References currently_reading_symtab.
Referenced by dw2_instantiate_symtab(), and psymtab_to_symtab().
void map_symbol_filenames | ( | gdb::function_view< symbol_filename_ftype > | fun, |
bool | need_fullname | ||
) |
Definition at line 3751 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().
CORE_ADDR overlay_mapped_address | ( | CORE_ADDR | pc, |
struct obj_section * | section | ||
) |
Definition at line 3085 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().
CORE_ADDR overlay_unmapped_address | ( | CORE_ADDR | pc, |
struct obj_section * | section | ||
) |
Definition at line 3067 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().
CORE_ADDR pc_in_mapped_range | ( | CORE_ADDR | pc, |
struct obj_section * | section | ||
) |
Definition at line 3036 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().
CORE_ADDR pc_in_unmapped_range | ( | CORE_ADDR | pc, |
struct obj_section * | section | ||
) |
Definition at line 3014 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().
int print_symbol_loading_p | ( | int | from_tty, |
int | mainline, | ||
int | full | ||
) |
Definition at line 163 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().
void relative_addr_info_to_section_offsets | ( | section_offsets & | section_offsets, |
const section_addr_info & | addrs | ||
) |
Definition at line 406 of file symfile.c.
References other_sections::addr, and other_sections::sectindex.
Referenced by default_symfile_offsets(), and objfile_relocate().
int section_is_mapped | ( | struct obj_section * | osect | ) |
Definition at line 2978 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 2940 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().
void set_initial_language | ( | void | ) |
Definition at line 1668 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_command(), and symbol_file_add_main_1().
void simple_overlay_update | ( | struct obj_section * | osect | ) |
Definition at line 3508 of file symfile.c.
References ALL_OBJFILE_OSECTIONS, cache_novlys, cache_ovly_table, cache_ovly_table_base, current_program_space, LMA, lookup_minimal_symbol(), MAPPED, bound_minimal_symbol::minsym, program_space::objfiles(), obj_section::ovly_mapped, section_is_overlay(), simple_overlay_update_1(), simple_read_overlay_table(), obj_section::the_bfd_section, minimal_symbol::value_address(), and VMA.
Referenced by csky_gdbarch_init(), ft32_gdbarch_init(), m32r_gdbarch_init(), and moxie_gdbarch_init().
struct objfile * symbol_file_add | ( | const char * | name, |
symfile_add_flags | add_flags, | ||
section_addr_info * | addrs, | ||
objfile_flags | flags | ||
) |
Definition at line 1176 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 1163 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 1194 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().
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 1142 of file symfile.c.
References build_section_addr_info_from_objfile(), objfile::flags, name, OBJF_MAINLINE, OBJF_READNOW, OBJF_REORDERED, 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().
void symbol_file_clear | ( | int | from_tty | ) |
Definition at line 1218 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().
CORE_ADDR symbol_overlayed_address | ( | CORE_ADDR | address, |
struct obj_section * | section | ||
) |
gdb_bfd_ref_ptr symfile_bfd_open | ( | const char * | name | ) |
Definition at line 1702 of file symfile.c.
References gdb_bfd_has_target_filename(), gdb_bfd_open(), gnutarget, is_target_filename(), name, O_BINARY, openp(), OPF_RETURN_REALPATH, OPF_TRY_CWD_FIRST, and perror_with_name().
Referenced by coff_symfile_read(), elf_symfile_read_dwarf2(), objfpy_add_separate_debug_file(), and symbol_file_add().
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 3634 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 3599 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().
|
extern |
Definition at line 151 of file symfile.c.
Referenced by enable_break(), handle_solib_event(), post_create_inferior(), reload_shared_libraries(), reload_shared_libraries_1(), remote_target::start_remote_1(), and svr4_fetch_objfile_link_map().
|
extern |
Definition at line 2933 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 |
|
extern |
Definition at line 94 of file symfile.c.
Referenced by captured_main_1(), symbol_file_add_with_addrs(), and validate_readnow_readnever().
|
extern |
Definition at line 90 of file symfile.c.
Referenced by captured_main_1(), reread_symbols(), symbol_file_add_with_addrs(), and validate_readnow_readnever().
|
extern |
Definition at line 1243 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().