GDB (xrefs)
|
#include "defs.h"
#include "bfd.h"
#include "gdb_string.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 "buildsym.h"
#include "stabsread.h"
#include "gdb-stabs.h"
#include "complaints.h"
#include "demangle.h"
#include "psympriv.h"
#include "filenames.h"
#include "probe.h"
#include "arch-utils.h"
#include "gdbtypes.h"
#include "value.h"
#include "infcall.h"
#include "gdbthread.h"
#include "regcache.h"
#include "bcache.h"
#include "gdb_bfd.h"
#include "build-id.h"
Go to the source code of this file.
#define ST_DYNAMIC 1 |
Definition at line 231 of file elfread.c.
Referenced by elf_symfile_read(), and elf_symtab_read().
#define ST_REGULAR 0 |
Definition at line 230 of file elfread.c.
Referenced by elf_symfile_read().
#define ST_SYNTHETIC 2 |
Definition at line 232 of file elfread.c.
Referenced by elf_symfile_read(), and elf_symtab_read().
#define SYMBOL_GOT_PLT_SUFFIX "@got.plt" |
Definition at line 78 of file elfread.c.
Referenced by elf_gnu_ifunc_resolve_by_got(), and elf_rel_plt_read().
void _initialize_elfread | ( | void | ) |
static int elf_can_evaluate_probe_arguments | ( | struct probe * | probe | ) | [static] |
Definition at line 1526 of file elfread.c.
References probe_ops::can_evaluate_probe_arguments, and probe::pops.
static void elf_compile_to_ax | ( | struct probe * | probe, |
struct agent_expr * | expr, | ||
struct axs_value * | value, | ||
unsigned | n | ||
) | [static] |
Definition at line 1543 of file elfread.c.
References probe_ops::compile_to_ax, and probe::pops.
static struct value* elf_evaluate_probe_argument | ( | struct probe * | probe, |
unsigned | n | ||
) | [static, read] |
Definition at line 1535 of file elfread.c.
References probe_ops::evaluate_probe_argument, and probe::pops.
static unsigned elf_get_probe_argument_count | ( | struct probe * | probe | ) | [static] |
Definition at line 1517 of file elfread.c.
References probe_ops::get_probe_argument_count, and probe::pops.
static int elf_gnu_ifunc_cache_eq | ( | const void * | a_voidp, |
const void * | b_voidp | ||
) | [static] |
Definition at line 739 of file elfread.c.
References elf_gnu_ifunc_cache::name.
Referenced by elf_gnu_ifunc_record_cache().
static hashval_t elf_gnu_ifunc_cache_hash | ( | const void * | a_voidp | ) | [static] |
Definition at line 729 of file elfread.c.
References elf_gnu_ifunc_cache::name.
Referenced by elf_gnu_ifunc_record_cache().
static int elf_gnu_ifunc_record_cache | ( | const char * | name, |
CORE_ADDR | addr | ||
) | [static] |
Definition at line 756 of file elfread.c.
References _, elf_gnu_ifunc_cache::addr, dummy_obstack_deallocate(), elf_gnu_ifunc_cache_eq(), elf_gnu_ifunc_cache_hash(), elf_objfile_gnu_ifunc_cache_data, get_objfile_arch(), hashtab_obstack_allocate(), lookup_minimal_symbol_by_pc(), bound_minimal_symbol::minsym, objfile::obfd, bound_minimal_symbol::objfile, objfile::objfile_obstack, obstack_grow_str0, paddress(), SYMBOL_OBJ_SECTION, SYMBOL_VALUE_ADDRESS, and warning().
Referenced by elf_gnu_ifunc_resolve_addr(), elf_gnu_ifunc_resolve_by_got(), and elf_gnu_ifunc_resolver_return_stop().
static CORE_ADDR elf_gnu_ifunc_resolve_addr | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | pc | ||
) | [static] |
Definition at line 942 of file elfread.c.
References value::address, allocate_value(), builtin_type::builtin_func_func, builtin_type(), call_function_by_hand(), current_target, elf_gnu_ifunc_record_cache(), elf_gnu_ifunc_resolve_name(), find_pc_partial_function(), gdbarch_convert_from_func_ptr_addr(), set_value_address(), and value_as_address().
static int elf_gnu_ifunc_resolve_by_cache | ( | const char * | name, |
CORE_ADDR * | addr_p | ||
) | [static] |
Definition at line 829 of file elfread.c.
References elf_gnu_ifunc_cache::addr, ALL_PSPACE_OBJFILES, current_program_space, elf_objfile_gnu_ifunc_cache_data, gdb_assert, and elf_gnu_ifunc_cache::name.
Referenced by elf_gnu_ifunc_resolve_name().
static int elf_gnu_ifunc_resolve_by_got | ( | const char * | name, |
CORE_ADDR * | addr_p | ||
) | [static] |
Definition at line 869 of file elfread.c.
References ALL_PSPACE_OBJFILES, builtin_type::builtin_data_ptr, builtin_type(), current_program_space, current_target, elf_gnu_ifunc_record_cache(), extract_typed_address(), gdbarch_convert_from_func_ptr_addr(), get_objfile_arch(), lookup_minimal_symbol(), mst_slot_got_plt, MSYMBOL_SIZE, MSYMBOL_TYPE, objfile::obfd, SYMBOL_GOT_PLT_SUFFIX, SYMBOL_VALUE_ADDRESS, target_read_memory(), and TYPE_LENGTH.
Referenced by elf_gnu_ifunc_resolve_name().
static int elf_gnu_ifunc_resolve_name | ( | const char * | name, |
CORE_ADDR * | addr_p | ||
) | [static] |
Definition at line 925 of file elfread.c.
References elf_gnu_ifunc_resolve_by_cache(), and elf_gnu_ifunc_resolve_by_got().
Referenced by elf_gnu_ifunc_resolve_addr().
static void elf_gnu_ifunc_resolver_return_stop | ( | struct breakpoint * | b | ) | [static] |
Definition at line 1032 of file elfread.c.
References _, breakpoint::addr_string, allocate_value(), bp_breakpoint, bp_gnu_ifunc_resolver, bp_gnu_ifunc_resolver_return, builtin_type::builtin_func_func, builtin_type(), current_program_space, current_target, delete_breakpoint(), elf_gnu_ifunc_record_cache(), find_pc_line(), gdb_assert, gdbarch_convert_from_func_ptr_addr(), gdbarch_return_value(), get_current_frame(), get_frame_arch(), get_thread_regcache(), inferior_ptid, internal_error(), breakpoint::loc, symtabs_and_lines::nelts, bp_location::next, breakpoint::pspace, bp_location::related_address, breakpoint::related_breakpoint, symtabs_and_lines::sals, set_value_address(), breakpoint::type, TYPE_TARGET_TYPE, update_breakpoint_locations(), value_as_address(), value_contents_raw(), and value_type().
static void elf_gnu_ifunc_resolver_stop | ( | struct breakpoint * | b | ) | [static] |
Definition at line 980 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::frame_id, frame_id_eq(), frame_id_p(), gdb_assert, get_current_frame(), get_frame_arch(), get_frame_pc(), get_prev_frame(), get_stack_frame_id(), inferior_ptid, init_sal(), breakpoint::loc, bp_location::next, symtab_and_line::pc, pid_to_thread_id(), 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 void elf_locate_sections | ( | bfd * | ignore_abfd, |
asection * | sectp, | ||
void * | eip | ||
) | [static] |
Definition at line 180 of file elfread.c.
References elfinfo::mdebugsect, elfinfo::stabindexsect, and elfinfo::stabsect.
Referenced by elf_symfile_read().
static void elf_new_init | ( | struct objfile * | ignore | ) | [static] |
Definition at line 1382 of file elfread.c.
References buildsym_new_init(), and stabsread_new_init().
static void elf_rel_plt_read | ( | struct objfile * | objfile, |
asymbol ** | dyn_symbol_table | ||
) | [static] |
Definition at line 630 of file elfread.c.
References builtin_type::builtin_data_ptr, builtin_type(), do_cleanups(), free_current_contents(), get_objfile_arch(), make_cleanup(), memcpy(), mst_slot_got_plt, name, objfile::obfd, record_minimal_symbol(), objfile::separate_debug_objfile_backlink, SET_MSYMBOL_SIZE, SYMBOL_GOT_PLT_SUFFIX, TYPE_LENGTH, and xrealloc().
Referenced by elf_symfile_read().
static void elf_symfile_finish | ( | struct objfile * | objfile | ) | [static] |
Definition at line 1394 of file elfread.c.
References dwarf2_free_objfile().
static void elf_symfile_init | ( | struct objfile * | objfile | ) | [static] |
Definition at line 1409 of file elfread.c.
References objfile::flags, and OBJF_REORDERED.
static void elf_symfile_read | ( | struct objfile * | objfile, |
int | symfile_flags | ||
) | [static] |
Definition at line 1120 of file elfread.c.
References _, dbx_objfile_data_key, do_cleanups(), dwarf2_has_info(), dwarf2_initialize_objfile(), elf_locate_sections(), elf_rel_plt_read(), elf_sym_fns_gdb_index, elf_sym_fns_lazy_psyms, elf_symtab_read(), elfmdebug_build_psymtabs(), elfstab_build_psymtabs(), error(), find_separate_debug_file_by_buildid(), find_separate_debug_file_by_debuglink(), fprintf_unfiltered(), free_elfinfo(), gdb_stdlog, init_minimal_symbol_collection(), install_minimal_symbols(), make_cleanup(), make_cleanup_bfd_unref(), make_cleanup_discard_minimal_symbols(), memset(), objfile::obfd, objfile_has_partial_symbols(), objfile_name(), objfile_set_sym_fns(), ST_DYNAMIC, ST_REGULAR, ST_SYNTHETIC, symbol_file_add_separate(), symfile_bfd_open(), symtab_create_debug, xfree(), and xmalloc().
static void elf_symfile_relocate_probe | ( | struct objfile * | objfile, |
const struct section_offsets * | new_offsets, | ||
const struct section_offsets * | delta | ||
) | [static] |
Definition at line 1554 of file elfread.c.
References ANOFFSET, probe::pops, probe_key, probe_ops::relocate, SECT_OFF_TEXT, VEC, and VEC_iterate.
static struct symfile_segment_data* elf_symfile_segments | ( | bfd * | abfd | ) | [static, read] |
Definition at line 83 of file elfread.c.
References _, symfile_segment_data::num_segments, symfile_segment_data::segment_bases, symfile_segment_data::segment_info, symfile_segment_data::segment_sizes, warning(), XCALLOC, and XZALLOC.
static void elf_symtab_read | ( | struct objfile * | objfile, |
int | type, | ||
long | number_of_symbols, | ||
asymbol ** | symbol_table, | ||
int | copy_names | ||
) | [static] |
Definition at line 235 of file elfread.c.
References _, ANOFFSET, bcache(), complaint(), minimal_symbol::created_by_gdb, DBX_SYMFILE_INFO, stab_section_info::filename, minimal_symbol::filename, objfile_per_bfd_storage::filename_cache, gdb_bfd_section_index(), gdbarch_elf_make_msymbol_special(), gdbarch_record_special_symbol(), gdbarch_record_special_symbol_p(), get_objfile_arch(), len, memset(), mst_abs, mst_bss, mst_data, mst_file_bss, mst_file_data, mst_file_text, mst_solib_trampoline, mst_text, mst_text_gnu_ifunc, mst_unknown, MSYMBOL_SIZE, stab_section_info::next, stab_section_info::num_sections, objfile::obfd, offset, objfile::per_bfd, record_minimal_symbol(), objfile::sect_index_data, objfile::sect_index_rodata, SECT_OFF_BSS, SECT_OFF_DATA, SECT_OFF_RODATA, objfile::section_offsets, stab_section_info::sections, SET_MSYMBOL_SIZE, size, ST_DYNAMIC, ST_SYNTHETIC, dbx_symfile_info::stab_section_info, strchr(), symfile_complaints, and xmalloc().
Referenced by elf_symfile_read().
void elfstab_offset_sections | ( | struct objfile * | objfile, |
struct partial_symtab * | pst | ||
) |
Definition at line 1426 of file elfread.c.
References _, complaint(), DBX_SYMFILE_INFO, stab_section_info::filename, partial_symtab::filename, stab_section_info::found, stab_section_info::next, stab_section_info::num_sections, objfile::num_sections, objfile::objfile_obstack, section_offsets::offsets, partial_symtab::section_offsets, stab_section_info::sections, SIZEOF_N_SECTION_OFFSETS, dbx_symfile_info::stab_section_info, and symfile_complaints.
Referenced by start_psymtab().
static void free_elfinfo | ( | void * | objp | ) | [static] |
Definition at line 1356 of file elfread.c.
References DBX_SYMFILE_INFO, stab_section_info::next, dbx_symfile_info::stab_section_info, and xfree().
Referenced by elf_symfile_read().
static void probe_key_free | ( | struct objfile * | objfile, |
void * | d | ||
) | [static] |
Definition at line 1570 of file elfread.c.
References probe_ops::destroy, probe::pops, VEC, VEC_free, and VEC_iterate.
static void read_psyms | ( | struct objfile * | objfile | ) | [static] |
Definition at line 1346 of file elfread.c.
References dwarf2_build_psymtabs(), and dwarf2_has_info().
static struct minimal_symbol* record_minimal_symbol | ( | const char * | name, |
int | name_len, | ||
int | copy_name, | ||
CORE_ADDR | address, | ||
enum minimal_symbol_type | ms_type, | ||
asection * | bfd_section, | ||
struct objfile * | objfile | ||
) | [static, read] |
Definition at line 200 of file elfread.c.
References gdb_bfd_section_index(), gdbarch_addr_bits_remove(), get_objfile_arch(), mst_file_text, mst_text, mst_text_gnu_ifunc, objfile::obfd, and prim_record_minimal_symbol_full().
Referenced by elf_rel_plt_read(), and elf_symtab_read().
Definition at line 1482 of file elfread.c.
References gdb_assert, probe_ops::get_probes, probe_key, VEC, VEC_iterate, and VEC_reserve.
struct gnu_ifunc_fns elf_gnu_ifunc_fns [static] |
struct objfile_data* elf_objfile_gnu_ifunc_cache_data [static] |
Definition at line 714 of file elfread.c.
Referenced by elf_gnu_ifunc_record_cache(), and elf_gnu_ifunc_resolve_by_cache().
struct sym_probe_fns elf_probe_fns [static] |
struct sym_fns elf_sym_fns [static] |
static struct sym_fns elf_sym_fns_gdb_index [static] |
{ elf_new_init, elf_symfile_init, elf_symfile_read, NULL, elf_symfile_finish, default_symfile_offsets, elf_symfile_segments, NULL, default_symfile_relocate, &elf_probe_fns, &dwarf2_gdb_index_functions }
Definition at line 53 of file elfread.c.
Referenced by elf_symfile_read().
static struct sym_fns elf_sym_fns_lazy_psyms [static] |
{ elf_new_init, elf_symfile_init, elf_symfile_read, read_psyms, elf_symfile_finish, default_symfile_offsets, elf_symfile_segments, NULL, default_symfile_relocate, &elf_probe_fns, &psym_functions }
Definition at line 54 of file elfread.c.
Referenced by elf_symfile_read().
struct objfile_data* probe_key = NULL [static] |
Definition at line 69 of file elfread.c.
Referenced by elf_symfile_relocate_probe(), and VEC().