GDB (xrefs)
|
#include "defs.h"
#include "bfd.h"
#include "elf-bfd.h"
#include "elf/common.h"
#include "elf/internal.h"
#include "elf/mips.h"
#include "symtab.h"
#include "symfile.h"
#include "objfiles.h"
#include "stabsread.h"
#include "demangle.h"
#include "filenames.h"
#include "probe.h"
#include "arch-utils.h"
#include "gdbtypes.h"
#include "value.h"
#include "infcall.h"
#include "gdbthread.h"
#include "inferior.h"
#include "regcache.h"
#include "bcache.h"
#include "gdb_bfd.h"
#include "build-id.h"
#include "location.h"
#include "auxv.h"
#include "mdebugread.h"
#include "ctfread.h"
#include "gdbsupport/gdb_string_view.h"
#include "gdbsupport/scoped_fd.h"
#include "debuginfod-support.h"
#include "dwarf2/public.h"
#include "cli/cli-cmds.h"
Go to the source code of this file.
Classes | |
struct | elfinfo |
struct | elf_gnu_ifunc_cache |
Macros | |
#define | SYMBOL_GOT_PLT_SUFFIX "@got.plt" |
#define | ST_REGULAR 0 |
#define | ST_DYNAMIC 1 |
#define | ST_SYNTHETIC 2 |
Typedefs | |
typedef std::vector< std::unique_ptr< probe > > | elfread_data |
Functions | |
static symfile_segment_data_up | elf_symfile_segments (bfd *abfd) |
static void | elf_locate_sections (asection *sectp, struct elfinfo *ei) |
static struct minimal_symbol * | record_minimal_symbol (minimal_symbol_reader &reader, gdb::string_view name, bool copy_name, unrelocated_addr address, enum minimal_symbol_type ms_type, asection *bfd_section, struct objfile *objfile) |
static void | elf_symtab_read (minimal_symbol_reader &reader, struct objfile *objfile, int type, long number_of_symbols, asymbol **symbol_table, bool copy_names) |
static void | elf_rel_plt_read (minimal_symbol_reader &reader, struct objfile *objfile, asymbol **dyn_symbol_table) |
static hashval_t | elf_gnu_ifunc_cache_hash (const void *a_voidp) |
static int | elf_gnu_ifunc_cache_eq (const void *a_voidp, const void *b_voidp) |
static int | elf_gnu_ifunc_record_cache (const char *name, CORE_ADDR addr) |
static int | elf_gnu_ifunc_resolve_by_cache (const char *name, CORE_ADDR *addr_p) |
static int | elf_gnu_ifunc_resolve_by_got (const char *name, CORE_ADDR *addr_p) |
static bool | elf_gnu_ifunc_resolve_name (const char *name, CORE_ADDR *addr_p) |
static CORE_ADDR | elf_gnu_ifunc_resolve_addr (struct gdbarch *gdbarch, CORE_ADDR pc) |
static void | elf_gnu_ifunc_resolver_stop (code_breakpoint *b) |
static void | elf_gnu_ifunc_resolver_return_stop (code_breakpoint *b) |
static void | elf_read_minimal_symbols (struct objfile *objfile, int symfile_flags, const struct elfinfo *ei) |
static bool | elf_symfile_read_dwarf2 (struct objfile *objfile, symfile_add_flags symfile_flags) |
static void | elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags) |
static void | elf_new_init (struct objfile *ignore) |
static void | elf_symfile_finish (struct objfile *objfile) |
static void | elf_symfile_init (struct objfile *objfile) |
static const elfread_data & | elf_get_probes (struct objfile *objfile) |
void | _initialize_elfread () |
Variables | |
static bool | always_read_ctf |
static const registry< bfd >::key< elfread_data > | probe_key |
static const registry< objfile >::key< htab, htab_deleter > | elf_objfile_gnu_ifunc_cache_data |
static const struct sym_probe_fns | elf_probe_fns |
static const struct sym_fns | elf_sym_fns |
static const struct gnu_ifunc_fns | elf_gnu_ifunc_fns |
#define ST_DYNAMIC 1 |
Definition at line 238 of file elfread.c.
Referenced by elf_read_minimal_symbols(), and elf_symtab_read().
#define ST_REGULAR 0 |
Definition at line 237 of file elfread.c.
Referenced by elf_read_minimal_symbols().
#define ST_SYNTHETIC 2 |
Definition at line 239 of file elfread.c.
Referenced by elf_read_minimal_symbols(), and elf_symtab_read().
#define SYMBOL_GOT_PLT_SUFFIX "@got.plt" |
Definition at line 82 of file elfread.c.
Referenced by elf_gnu_ifunc_resolve_by_got(), and elf_rel_plt_read().
typedef std::vector<std::unique_ptr<probe> > elfread_data |
void _initialize_elfread | ( | ) |
Definition at line 1457 of file elfread.c.
Referenced by initialize_all_files().
|
static |
Definition at line 1404 of file elfread.c.
References all_static_probe_ops, registry< T >::get(), objfile::obfd, and probe_key.
|
static |
Definition at line 678 of file elfread.c.
References elf_gnu_ifunc_cache::name.
Referenced by elf_gnu_ifunc_record_cache().
|
static |
Definition at line 667 of file elfread.c.
References elf_gnu_ifunc_cache::name.
Referenced by elf_gnu_ifunc_record_cache().
|
static |
Definition at line 697 of file elfread.c.
References elf_gnu_ifunc_cache::addr, objfile::arch(), elf_gnu_ifunc_cache_eq(), elf_gnu_ifunc_cache_hash(), elf_objfile_gnu_ifunc_cache_data, registry< T >::get(), general_symbol_info::linkage_name(), lookup_minimal_symbol_by_pc(), bound_minimal_symbol::minsym, name, bound_minimal_symbol::objfile, objfile::objfile(), objfile::objfile_obstack, paddress(), registry< T >::set(), target_name, bound_minimal_symbol::value_address(), xcalloc(), and xfree().
Referenced by elf_gnu_ifunc_resolve_addr(), elf_gnu_ifunc_resolve_by_got(), and elf_gnu_ifunc_resolver_return_stop().
|
static |
Definition at line 910 of file elfread.c.
References value::address, value::allocate(), builtin_type::builtin_func_func, builtin_type(), call_function_by_hand(), current_inferior(), elf_gnu_ifunc_record_cache(), elf_gnu_ifunc_resolve_name(), find_pc_partial_function(), gdbarch_addr_bits_remove(), gdbarch_convert_from_func_ptr_addr(), lval_memory, value::set_address(), value::set_lval(), target_auxv_search(), value_as_address(), and value_from_longest().
|
static |
Definition at line 775 of file elfread.c.
References elf_gnu_ifunc_cache::addr, elf_objfile_gnu_ifunc_cache_data, gdbarch_iterate_over_objfiles_in_search_order(), registry< T >::get(), name, elf_gnu_ifunc_cache::name, and target_gdbarch().
Referenced by elf_gnu_ifunc_resolve_name().
|
static |
Definition at line 824 of file elfread.c.
References objfile::arch(), builtin_type::builtin_data_ptr, builtin_type(), current_inferior(), elf_gnu_ifunc_record_cache(), extract_typed_address(), gdbarch_addr_bits_remove(), gdbarch_convert_from_func_ptr_addr(), gdbarch_iterate_over_objfiles_in_search_order(), type::length(), lookup_minimal_symbol(), bound_minimal_symbol::minsym, mst_slot_got_plt, name, objfile::obfd, minimal_symbol::size(), SYMBOL_GOT_PLT_SUFFIX, target_gdbarch(), target_read_memory(), minimal_symbol::type(), and bound_minimal_symbol::value_address().
Referenced by elf_gnu_ifunc_resolve_name().
|
static |
Definition at line 893 of file elfread.c.
References elf_gnu_ifunc_resolve_by_cache(), elf_gnu_ifunc_resolve_by_got(), and name.
Referenced by elf_gnu_ifunc_resolve_addr().
|
static |
Definition at line 1007 of file elfread.c.
References value::allocate(), bp_breakpoint, bp_gnu_ifunc_resolver, bp_gnu_ifunc_resolver_return, builtin_type::builtin_func_func, builtin_type(), current_inferior(), current_program_space, delete_breakpoint(), elf_gnu_ifunc_record_cache(), find_function_start_sal(), breakpoint::first_loc(), gdbarch_addr_bits_remove(), gdbarch_convert_from_func_ptr_addr(), gdbarch_return_value_as_value(), get_current_frame(), get_frame_arch(), get_thread_regcache(), breakpoint::has_single_location(), inferior_thread(), breakpoint::locspec, lval_memory, breakpoint::pspace, bp_location::related_address, breakpoint::related_breakpoint, value::set_address(), value::set_lval(), type::target_type(), breakpoint::type, update_breakpoint_locations(), value, and value_as_address().
|
static |
Definition at line 956 of file elfread.c.
References bp_gnu_ifunc_resolver, bp_gnu_ifunc_resolver_return, current_inferior(), symtab_and_line::explicit_pc, find_pc_overlay(), breakpoint::first_loc(), breakpoint::frame_id, frame_id_p(), get_current_frame(), get_frame_arch(), get_frame_pc(), get_prev_frame(), get_stack_frame_id(), thread_info::global_num, breakpoint::has_single_location(), inferior_thread(), symtab_and_line::pc, inferior::pspace, symtab_and_line::pspace, breakpoint::related_breakpoint, bp_location::requested_address, symtab_and_line::section, set_momentary_breakpoint(), breakpoint::thread, and breakpoint::type.
|
static |
Definition at line 182 of file elfread.c.
References elfinfo::ctfsect, elfinfo::mdebugsect, and elfinfo::stabsect.
Referenced by elf_symfile_read().
|
static |
|
static |
Definition at line 1066 of file elfread.c.
References elfinfo::ctfsect, elf_rel_plt_read(), elf_symtab_read(), minimal_symbol_reader::install(), elfinfo::mdebugsect, objfile_per_bfd_storage::minsyms_read, objfile::obfd, objfile_name(), objfile::per_bfd, objfile::separate_debug_objfile_backlink, ST_DYNAMIC, ST_REGULAR, ST_SYNTHETIC, elfinfo::stabsect, symtab_create_debug_printf, and xfree().
Referenced by elf_symfile_read().
|
static |
Definition at line 549 of file elfread.c.
References general_symbol_info::address, objfile::arch(), builtin_type::builtin_data_ptr, builtin_type(), type::length(), mst_slot_got_plt, name, objfile::obfd, record_minimal_symbol(), objfile::separate_debug_objfile_backlink, minimal_symbol::set_size(), and SYMBOL_GOT_PLT_SUFFIX.
Referenced by elf_read_minimal_symbols().
|
static |
|
static |
|
static |
Definition at line 1304 of file elfread.c.
References always_read_ctf, elfinfo::ctfsect, elf_locate_sections(), elf_read_minimal_symbols(), elf_symfile_read_dwarf2(), elfctf_build_psymtabs(), elfmdebug_build_psymtabs(), elfstab_build_psymtabs(), objfile::flags, gdb_bfd_sections(), elfinfo::mdebugsect, objfile::obfd, objfile::object_format_has_copy_relocs, OBJF_READNEVER, and elfinfo::stabsect.
|
static |
Definition at line 1198 of file elfread.c.
References build_id_bfd_get(), build_id_verify(), debuginfod_debuginfo_query(), dwarf2_has_info(), dwarf2_initialize_objfile(), deferred_warnings::emit(), find_separate_debug_file_by_buildid(), find_separate_debug_file_by_debuglink(), objfile::has_partial_symbols(), objfile::obfd, objfile::separate_debug_objfile, objfile::separate_debug_objfile_backlink, symbol_file_add_separate(), and symfile_bfd_open_no_error().
Referenced by elf_symfile_read().
|
static |
|
static |
Definition at line 242 of file elfread.c.
References objfile::arch(), minimal_symbol::created_by_gdb, minimal_symbol::filename, gdbarch_elf_make_msymbol_special(), gdbarch_elf_make_msymbol_special_p(), gdbarch_record_special_symbol(), gdbarch_record_special_symbol_p(), objfile::intern(), mst_abs, mst_bss, mst_data, mst_data_gnu_ifunc, mst_file_bss, mst_file_data, mst_file_text, mst_solib_trampoline, mst_text, mst_text_gnu_ifunc, mst_unknown, objfile::obfd, record_minimal_symbol(), minimal_symbol::set_size(), minimal_symbol::size(), ST_DYNAMIC, and ST_SYNTHETIC.
Referenced by elf_read_minimal_symbols().
|
static |
Definition at line 199 of file elfread.c.
References objfile::arch(), copy_name(), gdb_bfd_section_index(), gdbarch_addr_bits_remove(), mst_file_text, mst_text, mst_text_gnu_ifunc, name, objfile::obfd, and minimal_symbol_reader::record_full().
Referenced by elf_rel_plt_read(), and elf_symtab_read().
|
static |
Definition at line 56 of file elfread.c.
Referenced by elf_symfile_read().
|
static |
Definition at line 652 of file elfread.c.
Referenced by elf_gnu_ifunc_record_cache(), and elf_gnu_ifunc_resolve_by_cache().
|
static |
|
static |
|
static |
Definition at line 75 of file elfread.c.
Referenced by elf_get_probes().