GDB (xrefs)
Classes | Macros | Functions | Variables
/tmp/gdb-7.10/gdb/minsyms.c File Reference
#include "defs.h"
#include <ctype.h>
#include "symtab.h"
#include "bfd.h"
#include "filenames.h"
#include "symfile.h"
#include "objfiles.h"
#include "demangle.h"
#include "value.h"
#include "cp-abi.h"
#include "target.h"
#include "cp-support.h"
#include "language.h"
#include "cli/cli-utils.h"
#include "symbol.h"

Go to the source code of this file.

Classes

struct  msym_bunch
 

Macros

#define BUNCH_SIZE   127
 

Functions

unsigned int msymbol_hash_iw (const char *string)
 
unsigned int msymbol_hash (const char *string)
 
static void add_minsym_to_hash_table (struct minimal_symbol *sym, struct minimal_symbol **table)
 
static void add_minsym_to_demangled_hash_table (struct minimal_symbol *sym, struct minimal_symbol **table)
 
struct bound_minimal_symbol lookup_minimal_symbol (const char *name, const char *sfile, struct objfile *objf)
 
struct bound_minimal_symbol lookup_bound_minimal_symbol (const char *name)
 
int find_minimal_symbol_address (const char *name, CORE_ADDR *addr, struct objfile *objfile)
 
void iterate_over_minimal_symbols (struct objfile *objf, const char *name, void(*callback)(struct minimal_symbol *, void *), void *user_data)
 
struct bound_minimal_symbol lookup_minimal_symbol_text (const char *name, struct objfile *objf)
 
struct minimal_symbollookup_minimal_symbol_by_pc_name (CORE_ADDR pc, const char *name, struct objfile *objf)
 
struct bound_minimal_symbol lookup_minimal_symbol_solib_trampoline (const char *name, struct objfile *objf)
 
static int frob_address (struct objfile *objfile, CORE_ADDR *pc)
 
static struct bound_minimal_symbol lookup_minimal_symbol_by_pc_section_1 (CORE_ADDR pc_in, struct obj_section *section, int want_trampoline)
 
struct bound_minimal_symbol lookup_minimal_symbol_by_pc_section (CORE_ADDR pc, struct obj_section *section)
 
struct bound_minimal_symbol lookup_minimal_symbol_by_pc (CORE_ADDR pc)
 
int in_gnu_ifunc_stub (CORE_ADDR pc)
 
static CORE_ADDR stub_gnu_ifunc_resolve_addr (struct gdbarch *gdbarch, CORE_ADDR pc)
 
static int stub_gnu_ifunc_resolve_name (const char *function_name, CORE_ADDR *function_address_p)
 
static void stub_gnu_ifunc_resolver_stop (struct breakpoint *b)
 
static void stub_gnu_ifunc_resolver_return_stop (struct breakpoint *b)
 
struct bound_minimal_symbol lookup_minimal_symbol_and_objfile (const char *name)
 
static int get_symbol_leading_char (bfd *abfd)
 
void init_minimal_symbol_collection (void)
 
void prim_record_minimal_symbol (const char *name, CORE_ADDR address, enum minimal_symbol_type ms_type, struct objfile *objfile)
 
struct minimal_symbolprim_record_minimal_symbol_full (const char *name, int name_len, int copy_name, CORE_ADDR address, enum minimal_symbol_type ms_type, int section, struct objfile *objfile)
 
struct minimal_symbolprim_record_minimal_symbol_and_info (const char *name, CORE_ADDR address, enum minimal_symbol_type ms_type, int section, struct objfile *objfile)
 
static int compare_minimal_symbols (const void *fn1p, const void *fn2p)
 
static void do_discard_minimal_symbols_cleanup (void *arg)
 
struct cleanupmake_cleanup_discard_minimal_symbols (void)
 
static int compact_minimal_symbols (struct minimal_symbol *msymbol, int mcount, struct objfile *objfile)
 
static void build_minimal_symbol_hash_tables (struct objfile *objfile)
 
void install_minimal_symbols (struct objfile *objfile)
 
void terminate_minimal_symbol_table (struct objfile *objfile)
 
static struct minimal_symbollookup_solib_trampoline_symbol_by_pc (CORE_ADDR pc)
 
CORE_ADDR find_solib_trampoline_target (struct frame_info *frame, CORE_ADDR pc)
 
CORE_ADDR minimal_symbol_upper_bound (struct bound_minimal_symbol minsym)
 

Variables

static struct msym_bunchmsym_bunch
 
static int msym_bunch_index
 
static int msym_count
 
static const struct gnu_ifunc_fns stub_gnu_ifunc_fns
 
const struct gnu_ifunc_fnsgnu_ifunc_fns_p = &stub_gnu_ifunc_fns
 

Macro Definition Documentation

#define BUNCH_SIZE   127

Function Documentation

static void add_minsym_to_demangled_hash_table ( struct minimal_symbol sym,
struct minimal_symbol **  table 
)
static
static void add_minsym_to_hash_table ( struct minimal_symbol sym,
struct minimal_symbol **  table 
)
static
static void build_minimal_symbol_hash_tables ( struct objfile objfile)
static
static int compact_minimal_symbols ( struct minimal_symbol msymbol,
int  mcount,
struct objfile objfile 
)
static
static int compare_minimal_symbols ( const void *  fn1p,
const void *  fn2p 
)
static

Definition at line 1058 of file minsyms.c.

References MSYMBOL_LINKAGE_NAME, and MSYMBOL_VALUE_RAW_ADDRESS.

Referenced by install_minimal_symbols().

static void do_discard_minimal_symbols_cleanup ( void *  arg)
static

Definition at line 1100 of file minsyms.c.

References msym_bunch::next, and xfree().

Referenced by make_cleanup_discard_minimal_symbols().

int find_minimal_symbol_address ( const char *  name,
CORE_ADDR addr,
struct objfile objfile 
)
CORE_ADDR find_solib_trampoline_target ( struct frame_info frame,
CORE_ADDR  pc 
)
static int frob_address ( struct objfile objfile,
CORE_ADDR pc 
)
static
static int get_symbol_leading_char ( bfd *  abfd)
static

Definition at line 913 of file minsyms.c.

References symfile_objfile.

Referenced by prim_record_minimal_symbol_full().

int in_gnu_ifunc_stub ( CORE_ADDR  pc)
void init_minimal_symbol_collection ( void  )
void install_minimal_symbols ( struct objfile objfile)
void iterate_over_minimal_symbols ( struct objfile objf,
const char *  name,
void(*)(struct minimal_symbol *, void *)  callback,
void *  user_data 
)
struct bound_minimal_symbol lookup_bound_minimal_symbol ( const char *  name)
struct bound_minimal_symbol lookup_minimal_symbol ( const char *  name,
const char *  sfile,
struct objfile objf 
)

Definition at line 163 of file minsyms.c.

References case_sensitive_on, cp_canonicalize_string(), current_language, minimal_symbol::demangled_hash_next, minimal_symbol::filename, fprintf_unfiltered(), gdb_stdlog, hash(), minimal_symbol::hash_next, host_address_to_string(), int, language_defn::la_language, language_cplus, MINIMAL_SYMBOL_HASH_SIZE, bound_minimal_symbol::minsym, mst_file_bss, mst_file_data, mst_file_text, mst_solib_trampoline, mst_unknown, objfile_per_bfd_storage::msymbol_demangled_hash, msymbol_hash(), objfile_per_bfd_storage::msymbol_hash, msymbol_hash_iw(), MSYMBOL_LINKAGE_NAME, MSYMBOL_MATCHES_SEARCH_NAME, MSYMBOL_TYPE, name, objfile::next, object_files, bound_minimal_symbol::objfile, objfile_debug_name(), objfile::per_bfd, objfile::separate_debug_objfile_backlink, symbol_lookup_debug, and xfree().

Referenced by ada_has_this_exception_support(), ada_main_name(), ada_tasks_inferior_data_sniffer(), ada_update_initial_language(), arm_skip_stub(), avr_scan_prologue(), bsd_uthread_lookup_address(), call_site_to_target_addr(), call_target_sbrk(), checkpoint_command(), coff_symfile_read(), compile_object_load(), convert_code_addr_to_desc_addr(), create_exception_master_breakpoint(), create_std_terminate_master_breakpoint(), d_main_name(), define_symbol(), elf_gnu_ifunc_resolve_by_got(), elf_locate_base(), enable_break(), end_psymtab(), evaluate_subexp_standard(), find_imps(), find_minimal_symbol_address(), find_stab_function_addr(), flush_ea_cache(), frv_frame_this_id(), gcc_convert_symbol(), gen_var_ref(), get_running_thread_msymbol(), get_signo(), glibc_skip_solib_resolver(), gnuv3_get_typeid(), gnuv3_skip_trampoline(), go_main_name(), has_ravenscar_runtime(), hppa_symbol_address(), inferior_call_waitpid(), inferior_has_bug(), inside_main_func(), jit_breakpoint_re_set_internal(), ld_so_xfer_auxv(), lm_base(), lookup_bound_minimal_symbol(), lookup_child_selector(), lookup_objc_class(), m32c_m16c_address_to_pointer(), m32c_m16c_pointer_to_address(), m32c_return_value(), m32r_frame_this_id(), m68hc11_get_register_info(), macho_resolve_oso_sym_with_minsym(), main_got(), minsym_lookup_iterator_cb(), mips_linux_skip_resolver(), obsd_skip_solib_resolver(), ocl_enable_break(), pascal_main_name(), pd_enable(), pdc_symbol_addrs(), ppc_linux_spe_context_lookup(), ps_pglobal_lookup(), remote_check_symbols(), scope_info(), simple_overlay_update(), simple_read_overlay_table(), sol2_skip_solib_resolver(), spu_catch_start(), spu_enable_break(), spu_get_overlay_table(), tui_get_begin_asm_address(), value_nsstring(), and value_static_field().

struct bound_minimal_symbol lookup_minimal_symbol_and_objfile ( const char *  name)
struct bound_minimal_symbol lookup_minimal_symbol_by_pc ( CORE_ADDR  pc)

Definition at line 801 of file minsyms.c.

References find_pc_section(), and lookup_minimal_symbol_by_pc_section_1().

Referenced by amd64_skip_main_prologue(), amd64_windows_skip_trampoline_code(), arm_pc_is_thumb(), arm_pe_skip_trampoline_code(), arm_skip_stack_protector(), arm_wince_skip_main_prologue(), c_val_print(), call_site_find_chain_1(), call_site_for_pc(), call_site_to_target_addr(), convert_code_addr_to_desc_addr(), dwarf_expr_reg_to_entry_parameter(), elf_gnu_ifunc_record_cache(), find_frame_funname(), find_pc_sect_line(), frame_info(), frv_skip_main_prologue(), ftrace_update_function(), func_verify_no_selftailcall(), get_function_name(), get_pc_function_start(), get_prev_frame_always_1(), gnuv2_value_rtti_type(), gnuv3_get_typename_from_type_info(), gnuv3_rtti_type(), gnuv3_skip_trampoline(), i386_pe_skip_trampoline_code(), i386_skip_main_prologue(), ia64_convert_from_func_ptr_addr(), in_gnu_ifunc_stub(), info_cb(), info_checkpoints_command(), m32c_m16c_address_to_pointer(), m32c_m16c_pointer_to_address(), m68hc11_get_return_insn(), maintenance_translate_address(), mips_make_symbol_special(), mips_pc_is_micromips(), mips_pc_is_mips(), mips_pc_is_mips16(), mips_pc_isa(), mips_skip_pic_trampoline_code(), mips_stub_frame_sniffer(), msp430_skip_trampoline_code(), pascal_val_print(), pc_is_isa32(), powerpc_linux_in_dynsym_resolve_code(), ppc_elfv2_skip_entrypoint(), py_print_frame(), read_atcb(), resolve_sal_pc(), rs6000_skip_main_prologue(), rs6000_skip_trampoline_code(), skip_prologue_function(), tailcall_dump(), until_next_command(), and write_exp_msymbol().

struct minimal_symbol* lookup_minimal_symbol_by_pc_name ( CORE_ADDR  pc,
const char *  name,
struct objfile objf 
)
struct bound_minimal_symbol lookup_minimal_symbol_by_pc_section ( CORE_ADDR  pc,
struct obj_section section 
)
static struct bound_minimal_symbol lookup_minimal_symbol_by_pc_section_1 ( CORE_ADDR  pc_in,
struct obj_section section,
int  want_trampoline 
)
static
struct bound_minimal_symbol lookup_minimal_symbol_solib_trampoline ( const char *  name,
struct objfile objf 
)
struct bound_minimal_symbol lookup_minimal_symbol_text ( const char *  name,
struct objfile objf 
)
static struct minimal_symbol* lookup_solib_trampoline_symbol_by_pc ( CORE_ADDR  pc)
static
struct cleanup* make_cleanup_discard_minimal_symbols ( void  )
CORE_ADDR minimal_symbol_upper_bound ( struct bound_minimal_symbol  minsym)
unsigned int msymbol_hash ( const char *  string)
unsigned int msymbol_hash_iw ( const char *  string)
void prim_record_minimal_symbol ( const char *  name,
CORE_ADDR  address,
enum minimal_symbol_type  ms_type,
struct objfile objfile 
)
struct minimal_symbol* prim_record_minimal_symbol_and_info ( const char *  name,
CORE_ADDR  address,
enum minimal_symbol_type  ms_type,
int  section,
struct objfile objfile 
)
struct minimal_symbol* prim_record_minimal_symbol_full ( const char *  name,
int  name_len,
int  copy_name,
CORE_ADDR  address,
enum minimal_symbol_type  ms_type,
int  section,
struct objfile objfile 
)
static CORE_ADDR stub_gnu_ifunc_resolve_addr ( struct gdbarch gdbarch,
CORE_ADDR  pc 
)
static

Definition at line 828 of file minsyms.c.

References _, error(), and paddress().

static int stub_gnu_ifunc_resolve_name ( const char *  function_name,
CORE_ADDR function_address_p 
)
static

Definition at line 838 of file minsyms.c.

References _, and error().

static void stub_gnu_ifunc_resolver_return_stop ( struct breakpoint b)
static

Definition at line 858 of file minsyms.c.

References _, and internal_error().

static void stub_gnu_ifunc_resolver_stop ( struct breakpoint b)
static

Definition at line 849 of file minsyms.c.

References _, and internal_error().

void terminate_minimal_symbol_table ( struct objfile objfile)

Variable Documentation

const struct gnu_ifunc_fns* gnu_ifunc_fns_p = &stub_gnu_ifunc_fns

Definition at line 876 of file minsyms.c.

Referenced by _initialize_elfread().

struct msym_bunch* msym_bunch
static

Definition at line 70 of file minsyms.c.

Referenced by prim_record_minimal_symbol_full().

int msym_bunch_index
static
int msym_count
static
const struct gnu_ifunc_fns stub_gnu_ifunc_fns
static
Initial value:
=
{
}
static CORE_ADDR stub_gnu_ifunc_resolve_addr(struct gdbarch *gdbarch, CORE_ADDR pc)
Definition: minsyms.c:828
static void stub_gnu_ifunc_resolver_return_stop(struct breakpoint *b)
Definition: minsyms.c:858
static void stub_gnu_ifunc_resolver_stop(struct breakpoint *b)
Definition: minsyms.c:849
static int stub_gnu_ifunc_resolve_name(const char *function_name, CORE_ADDR *function_address_p)
Definition: minsyms.c:838

Definition at line 866 of file minsyms.c.