GDB (xrefs)
|
#include "hashtab.h"
#include "gdbsupport/gdb_obstack.h"
#include "objfile-flags.h"
#include "symfile.h"
#include "progspace.h"
#include "registry.h"
#include "gdb_bfd.h"
#include "psymtab.h"
#include <atomic>
#include <bitset>
#include <vector>
#include "gdbsupport/next-iterator.h"
#include "gdbsupport/safe-iterator.h"
#include "bcache.h"
#include "gdbarch.h"
#include "gdbsupport/refcounted-object.h"
#include "jit.h"
#include "quick-symbol.h"
#include <forward_list>
Go to the source code of this file.
Classes | |
struct | entry_info |
struct | objstats |
struct | minimal_symbol_iterator |
struct | objfile_per_bfd_storage |
class | separate_debug_iterator |
struct | objfile |
struct | objfile_deleter |
struct | obj_section |
Macros | |
#define | ALL_OBJFILE_OSECTIONS(objfile, osect) |
#define | SECT_OFF_DATA(objfile) |
#define | SECT_OFF_RODATA(objfile) |
#define | SECT_OFF_TEXT(objfile) |
#define | SECT_OFF_BSS(objfile) (objfile)->sect_index_bss |
#define | OBJSTAT(objfile, expr) (objfile -> stats.expr) |
#define | OBJSTATS struct objstats stats |
#define | MINIMAL_SYMBOL_HASH_SIZE 2039 |
Typedefs | |
typedef iterator_range< separate_debug_iterator > | separate_debug_range |
typedef std::unique_ptr< objfile, objfile_deleter > | objfile_up |
#define ALL_OBJFILE_OSECTIONS | ( | objfile, | |
osect | |||
) |
Definition at line 130 of file objfiles.h.
#define MINIMAL_SYMBOL_HASH_SIZE 2039 |
Definition at line 183 of file objfiles.h.
Definition at line 178 of file objfiles.h.
#define OBJSTATS struct objstats stats |
Definition at line 179 of file objfiles.h.
Definition at line 156 of file objfiles.h.
#define SECT_OFF_DATA | ( | objfile | ) |
Definition at line 138 of file objfiles.h.
#define SECT_OFF_RODATA | ( | objfile | ) |
Definition at line 143 of file objfiles.h.
#define SECT_OFF_TEXT | ( | objfile | ) |
Definition at line 148 of file objfiles.h.
typedef std::unique_ptr<objfile, objfile_deleter> objfile_up |
Definition at line 801 of file objfiles.h.
typedef iterator_range<separate_debug_iterator> separate_debug_range |
Definition at line 380 of file objfiles.h.
void build_objfile_section_table | ( | struct objfile * | objfile | ) |
Definition at line 280 of file objfiles.c.
References add_to_objfile_sections(), gdb_bfd_count_sections(), gdb_bfd_sections(), objfile::obfd, obj_section::objfile, objfile::objfile_obstack, objfile::sections, and objfile::sections_end.
Referenced by objfile::objfile(), and reread_symbols().
void default_iterate_over_objfiles_in_search_order | ( | gdbarch * | gdbarch, |
iterate_over_objfiles_in_search_order_cb_ftype | cb, | ||
objfile * | current_objfile | ||
) |
Definition at line 1296 of file objfiles.c.
References current_program_space, and program_space::objfiles().
CORE_ADDR entry_point_address | ( | void | ) |
Definition at line 373 of file objfiles.c.
References entry_point_address_query().
Referenced by arc_push_dummy_code(), call_function_by_hand_dummy(), and displaced_step_at_entry_point().
int entry_point_address_query | ( | CORE_ADDR * | entry_p | ) |
Definition at line 358 of file objfiles.c.
References current_program_space, objfile_per_bfd_storage::ei, entry_info::entry_point, entry_info::entry_point_p, objfile::per_bfd, objfile::section_offsets, program_space::symfile_object_file, and entry_info::the_bfd_section_index.
Referenced by enable_break(), entry_point_address(), and inside_entry_func().
struct obj_section * find_pc_section | ( | CORE_ADDR | pc | ) |
Definition at line 1170 of file objfiles.c.
References bsearch_cmp(), current_program_space, find_pc_mapped_section(), get_objfile_pspace_data(), objfile_pspace_info::inhibit_updates, objfile_pspace_info::new_objfiles_available, objfile_pspace_info::num_sections, objfile_pspace_info::section_map_dirty, objfile_pspace_info::sections, and update_section_map().
Referenced by amd64_windows_find_unwind_info(), amd64obsd_sigtramp_p(), arc_delayed_print_insn(), arm_find_exidx_entry(), arm_find_mapping_symbol(), arm_skip_stub(), BP_MANIPULATION(), convert_code_addr_to_desc_addr(), enable_break(), find_extant_func_descr(), find_pc_partial_function_sym(), get_pc_function_start(), gnuv3_skip_trampoline(), hppa64_convert_code_addr_to_fptr(), hppa_linux_find_global_pointer(), hppabsd_find_global_pointer(), i386_thiscall_push_dummy_call(), i386obsd_sigtramp_p(), ia64_convert_from_func_ptr_addr(), ia64_find_global_pointer_from_dynamic_section(), lookup_minimal_symbol_by_pc_section(), maintenance_print_psymbols(), mep_gdb_print_insn(), mep_pc_in_vliw_section(), mi_memory_changed(), pc_in_section(), rs6000_convert_from_func_ptr_addr(), solib_aix_get_toc_value(), svr4_create_solib_event_breakpoints(), tilegx_skip_prologue(), tui_find_backward_disassembly_start_address(), and xstormy16_find_jmp_table_entry().
void free_objfile_separate_debug | ( | struct objfile * | objfile | ) |
Definition at line 479 of file objfiles.c.
References objfile::separate_debug_objfile, objfile::separate_debug_objfile_link, and objfile::unlink().
Referenced by reread_symbols(), and objfile::~objfile().
int have_full_symbols | ( | void | ) |
Definition at line 818 of file objfiles.c.
References current_program_space, objfile_has_full_symbols(), and program_space::objfiles().
Referenced by info_sources_command(), list_command(), make_source_files_completion_list(), parser_state::push_symbol(), set_default_source_symtab_and_line(), symbol_file_add_with_addrs(), symbol_file_clear(), symbol_not_found_error(), symtabs_from_filename(), tui_get_begin_asm_address(), write_var_or_type(), and yyparse().
int have_minimal_symbols | ( | void | ) |
Definition at line 852 of file objfiles.c.
References current_program_space, and program_space::objfiles().
Referenced by start_command(), and symbol_not_found_error().
int have_partial_symbols | ( | void | ) |
Definition at line 803 of file objfiles.c.
References current_program_space, and program_space::objfiles().
Referenced by info_sources_command(), list_command(), make_source_files_completion_list(), parser_state::push_symbol(), set_default_source_symtab_and_line(), symbol_file_add_with_addrs(), symbol_file_clear(), symbol_not_found_error(), symtabs_from_filename(), tui_get_begin_asm_address(), write_var_or_type(), and yyparse().
|
inlinestatic |
Definition at line 901 of file objfiles.h.
References pc_in_section().
Referenced by aarch64_stub_unwind_sniffer(), arm_stub_unwind_sniffer(), csky_stub_unwind_sniffer(), dsbt_in_dynsym_resolve_code(), frv_in_dynsym_resolve_code(), hppa_in_solib_call_trampoline(), hppa_linux_find_global_pointer(), hppa_skip_trampoline_code(), hppabsd_find_global_pointer(), i386_thiscall_push_dummy_call(), mips_stub_frame_sniffer(), nios2_stub_frame_sniffer(), nto_in_dynsym_resolve_code(), s390_stub_frame_sniffer(), sh_stub_unwind_sniffer(), solib_target_in_dynsym_resolve_code(), sparc_analyze_prologue(), svr4_in_dynsym_resolve_code(), and tic6x_stub_unwind_sniffer().
scoped_restore_tmpl< int > inhibit_section_map_updates | ( | struct program_space * | pspace | ) |
Definition at line 1244 of file objfiles.c.
References get_objfile_pspace_data().
Referenced by svr4_handle_solib_event().
bool is_addr_in_objfile | ( | CORE_ADDR | addr, |
const struct objfile * | objfile | ||
) |
Definition at line 1253 of file objfiles.c.
References obj_section::addr(), ALL_OBJFILE_OSECTIONS, obj_section::endaddr(), section_is_mapped(), and section_is_overlay().
Referenced by disable_breakpoints_in_freed_objfile(), remove_symbol_file_command(), and shared_objfile_contains_address_p().
const char * objfile_debug_name | ( | const struct objfile * | objfile | ) |
Definition at line 1330 of file objfiles.c.
References objfile::original_name.
Referenced by debug_sym_finish(), debug_sym_get_probes(), debug_sym_init(), debug_sym_new_init(), debug_sym_offsets(), debug_sym_read(), debug_sym_read_linetable(), debug_sym_relocate(), objfile::dump(), objfile::expand_all_symtabs(), objfile::expand_matching_symbols(), objfile::expand_symtabs_for_function(), objfile::expand_symtabs_matching(), objfile::expand_symtabs_with_fullname(), objfile::find_compunit_symtab_by_address(), objfile::find_last_source_symtab(), objfile::find_pc_sect_compunit_symtab(), objfile::forget_cached_source_info(), objfile::has_partial_symbols(), objfile::has_unexpanded_symtabs(), lookup_language_this(), lookup_minimal_symbol(), objfile::lookup_symbol(), lookup_symbol_aux(), lookup_symbol_in_block(), lookup_symbol_in_objfile(), lookup_symbol_in_objfile_symtabs(), lookup_symbol_in_static_block(), lookup_symbol_via_quick_fns(), objfile::map_symbol_filenames(), objfile::map_symtabs_matching_filename(), and objfile::print_stats().
const char * objfile_filename | ( | const struct objfile * | objfile | ) |
Definition at line 1319 of file objfiles.c.
References objfile::obfd.
Referenced by gdbpy_lookup_objfile().
const char * objfile_flavour_name | ( | struct objfile * | objfile | ) |
Definition at line 1338 of file objfiles.c.
References objfile::obfd.
Referenced by language_defn::read_var_value().
int objfile_has_full_symbols | ( | struct objfile * | objfile | ) |
Definition at line 780 of file objfiles.c.
References objfile::compunit_symtabs.
Referenced by have_full_symbols(), and objfile_has_symbols().
int objfile_has_symbols | ( | struct objfile * | objfile | ) |
Definition at line 789 of file objfiles.c.
References objfile_has_full_symbols(), and objfile::separate_debug_objfiles().
Referenced by add_symbol_file_command(), info_sharedlibrary_command(), info_sources_worker(), objfile::require_partial_symbols(), reread_symbols(), and symbol_file_add_with_addrs().
Definition at line 1348 of file objfiles.c.
References TRY_TYPE.
Referenced by dwarf2_cu::addr_sized_int_type(), read_enum_type(), and read_tag_string_type().
const struct dynamic_prop * objfile_lookup_static_link | ( | struct objfile * | objfile, |
const struct block * | block | ||
) |
Definition at line 228 of file objfiles.c.
References static_link_htab_entry::block, static_link_htab_entry::static_link, and objfile::static_links.
Referenced by block_static_link().
const char * objfile_name | ( | const struct objfile * | objfile | ) |
Definition at line 1308 of file objfiles.c.
References objfile::obfd, and objfile::original_name.
Referenced by allocate_symtab(), auto_load_objfile_script(), auto_load_objfile_script_1(), build_error_marker_type(), lnp_state_machine::check_line_address(), clone_program_space(), coff_symtab_read(), collect_probes(), compare_probes(), compile_object_load(), create_dwp_v2_or_v5_section(), dbx_symfile_read(), die_containing_type(), do_module_cleanup(), expr::dump_for_expression(), dump_msymbols(), dump_objfile(), dump_psymtab(), dump_symtab_1(), dw2_expand_marked_cus(), dw2_symtab_iter_next(), dwarf2_build_frame_info(), dwarf2_build_psymtabs_hard(), dwarf2_fetch_constant_bytes(), dwarf2_fetch_die_loc_sect_off(), dwarf2_physname(), dwarf2_ranges_process(), dwarf2_read_debug_names(), dwarf2_read_gdb_index(), dwarf2_rnglists_process(), dwarf2_string_attr(), dwarf_decode_macro_bytes(), elf_read_minimal_symbols(), execute_script_contents(), filter_overlapping_sections(), find_separate_debug_file(), find_separate_debug_file_by_buildid(), find_separate_debug_file_by_debuglink(), find_separate_debug_file_in_section(), dw2_debug_names_iterator::find_vec_in_debug_names(), fixup_go_packaging(), follow_die_ref(), follow_die_ref_or_sig(), follow_die_sig(), gdbscm_objfile_filename(), gdbscm_progspace_filename(), get_alignment(), get_DW_AT_signature_type(), get_out_value_type(), get_regs_type(), get_signatured_type(), handle_stap_probe(), handle_variant(), handle_variant_part(), info_address_command(), info_probes_for_spops(), info_sources_worker(), info_symbol_command(), info_target_command(), minimal_symbol_reader::install(), is_known_support_routine(), jit_object_close_impl(), libpthread_objfile_p(), locexpr_describe_location_piece(), lookup_die_type(), lookup_dwo_cutu(), macho_check_dsym(), macho_symfile_relocate(), macho_symtab_read(), maintenance_check_symtabs(), maintenance_info_psymtabs(), maintenance_info_symtabs(), maintenance_print_msymbols(), maintenance_print_objfiles(), maintenance_print_one_line_table(), maintenance_print_psymbols(), maintenance_print_symbol_cache(), maintenance_print_symbol_cache_statistics(), maintenance_print_symbols(), maintenance_translate_address(), maybe_print_script_not_found_warning(), maybe_print_unsupported_script_warning(), maybe_set_alignment(), dw2_debug_names_iterator::next(), objfpy_get_filename(), objfpy_repr(), ofscm_print_objfile_smob(), open_and_init_dwp_file(), parse_probes_in_pspace(), print_objfile_statistics(), process_full_comp_unit(), process_imported_unit_die(), process_queue(), process_structure_scope(), pspy_get_filename(), psscm_print_pspace_smob(), quirk_rust_enum(), read_addr_index_1(), read_addrmap_from_aranges(), read_array_type(), read_call_site_scope(), read_common_block(), read_import_statement(), read_loclist_index(), read_one_sym(), read_rnglist_index(), read_str_index(), read_stub_str_index(), read_subrange_type(), read_tag_pointer_type(), read_typedef(), remove_symbol_file_command(), objfile::require_partial_symbols(), reread_symbols(), save_gdb_index_command(), scan_file_globals(), separate_debug_file_exists(), solib_aix_get_toc_value(), solib_read_symbols(), source_script_file(), index_cache::store(), symbol_file_clear(), target_translate_tls_address(), try_open_dwop_file(), try_thread_db_load_from_pdir_1(), type_name_or_error(), and xcoff_initial_scan().
void objfile_purge_solibs | ( | void | ) |
Definition at line 834 of file objfiles.c.
References current_program_space, OBJF_SHARED, OBJF_USERLOADED, and program_space::objfiles_safe().
Referenced by no_shared_libraries().
void objfile_rebase | ( | struct objfile * | objfile, |
CORE_ADDR | slide | ||
) |
Definition at line 765 of file objfiles.c.
References breakpoint_re_set(), objfile_rebase1(), and objfile::separate_debug_objfiles().
Referenced by darwin_solib_create_inferior_hook(), symbol_file_add_main_1(), and windows_solib_create_inferior_hook().
void objfile_register_static_link | ( | struct objfile * | objfile, |
const struct block * | block, | ||
const struct dynamic_prop * | static_link | ||
) |
Definition at line 199 of file objfiles.c.
References static_link_htab_entry::block, objfile::objfile_obstack, static_link_htab_entry::static_link, static_link_htab_entry_eq(), static_link_htab_entry_hash(), objfile::static_links, xcalloc(), and xfree().
Referenced by buildsym_compunit::finish_block_internal().
void objfile_relocate | ( | struct objfile * | objfile, |
const section_offsets & | new_offsets | ||
) |
Definition at line 716 of file objfiles.c.
References addr_info_make_relative(), breakpoint_re_set(), build_section_addr_info_from_objfile(), gdb_bfd_count_sections(), objfile_relocate1(), relative_addr_info_to_section_offsets(), and objfile::separate_debug_objfiles().
Referenced by dsbt_relocate_main_executable(), frv_relocate_main_executable(), remote_target::get_offsets(), set_objfile_default_section_offset(), solib_aix_solib_create_inferior_hook(), and svr4_relocate_main_executable().
Definition at line 760 of file symfile-debug.c.
References debug_symfile, install_symfile_debug_logging(), objfile::sf, symfile_debug_installed(), and uninstall_symfile_debug_logging().
Referenced by reread_symbols(), and syms_from_objfile_1().
void objfiles_changed | ( | void | ) |
Definition at line 1235 of file objfiles.c.
References current_program_space, get_objfile_pspace_data(), and objfile_pspace_info::section_map_dirty.
Referenced by reread_symbols().
int pc_in_section | ( | CORE_ADDR | pc, |
const char * | name | ||
) |
Definition at line 1217 of file objfiles.c.
References find_pc_section(), name, and obj_section::the_bfd_section.
Referenced by in_mips_stubs_section(), and in_plt_section().
void print_objfile_statistics | ( | void | ) |
Definition at line 52 of file symmisc.c.
References objfile::compunits(), gdb_printf(), gdb::bcache::memory_used(), objfile_per_bfd_storage::n_minsyms, objfile_name(), OBJSTAT, objfile::per_bfd, gdb::bcache::print_statistics(), objfile::print_stats(), program_spaces, QUIT, objfile_per_bfd_storage::storage_obstack, and objfile_per_bfd_storage::string_cache.
Referenced by maintenance_print_statistics().
Definition at line 152 of file objfiles.c.
References objfile_per_bfd_storage::language_of_main, name, objfile_per_bfd_storage::name_of_main, objfile::per_bfd, and objfile_per_bfd_storage::storage_obstack.
Referenced by ctf_add_var_cb(), process_one_symbol(), and read_func_scope().
void set_objfile_per_bfd | ( | struct objfile * | obj | ) |
Definition at line 121 of file objfiles.c.
References gdb_bfd_requires_relocations(), objfile_per_bfd_storage::gdbarch, gdbarch_from_bfd(), registry< T >::get(), objfile::obfd, objfiles_bfd_data, objfile::per_bfd, objfile::per_bfd_storage, and registry< T >::set().
Referenced by objfile::objfile(), and reread_symbols().
bool shared_objfile_contains_address_p | ( | struct program_space * | pspace, |
CORE_ADDR | address | ||
) |
Definition at line 1274 of file objfiles.c.
References objfile::flags, is_addr_in_objfile(), OBJF_SHARED, and program_space::objfiles().
Referenced by insert_bp_location(), and remove_breakpoint_1().