GDB (xrefs)
Classes | Defines | Functions | Variables
/home/stan/gdb/src/gdb/elfread.c File Reference
#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.

Classes

struct  elfinfo
struct  elf_gnu_ifunc_cache

Defines

#define SYMBOL_GOT_PLT_SUFFIX   "@got.plt"
#define ST_REGULAR   0
#define ST_DYNAMIC   1
#define ST_SYNTHETIC   2

Functions

void _initialize_elfread (void)
static void free_elfinfo (void *)
static struct
symfile_segment_data
elf_symfile_segments (bfd *abfd)
static void elf_locate_sections (bfd *ignore_abfd, asection *sectp, void *eip)
static struct minimal_symbolrecord_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 void elf_symtab_read (struct objfile *objfile, int type, long number_of_symbols, asymbol **symbol_table, int copy_names)
static void elf_rel_plt_read (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 int 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 (struct breakpoint *b)
static void elf_gnu_ifunc_resolver_return_stop (struct breakpoint *b)
static void elf_symfile_read (struct objfile *objfile, int symfile_flags)
static void read_psyms (struct objfile *objfile)
static void elf_new_init (struct objfile *ignore)
static void elf_symfile_finish (struct objfile *objfile)
static void elf_symfile_init (struct objfile *objfile)
void elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst)
static VEC (probe_p)
static unsigned elf_get_probe_argument_count (struct probe *probe)
static int elf_can_evaluate_probe_arguments (struct probe *probe)
static struct valueelf_evaluate_probe_argument (struct probe *probe, unsigned n)
static void elf_compile_to_ax (struct probe *probe, struct agent_expr *expr, struct axs_value *value, unsigned n)
static void elf_symfile_relocate_probe (struct objfile *objfile, const struct section_offsets *new_offsets, const struct section_offsets *delta)
static void probe_key_free (struct objfile *objfile, void *d)

Variables

static struct sym_fns elf_sym_fns_gdb_index
static struct sym_fns elf_sym_fns_lazy_psyms
static struct objfile_data * probe_key = NULL
static struct objfile_data * elf_objfile_gnu_ifunc_cache_data
static struct sym_probe_fns elf_probe_fns
static struct sym_fns elf_sym_fns
static struct gnu_ifunc_fns elf_gnu_ifunc_fns

Define Documentation

#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().


Function Documentation

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]
static CORE_ADDR elf_gnu_ifunc_resolve_addr ( struct gdbarch gdbarch,
CORE_ADDR  pc 
) [static]
static int elf_gnu_ifunc_resolve_by_cache ( const char *  name,
CORE_ADDR addr_p 
) [static]
static int elf_gnu_ifunc_resolve_by_got ( const char *  name,
CORE_ADDR addr_p 
) [static]
static int elf_gnu_ifunc_resolve_name ( const char *  name,
CORE_ADDR addr_p 
) [static]
static void elf_gnu_ifunc_resolver_return_stop ( struct breakpoint b) [static]
static void elf_gnu_ifunc_resolver_stop ( struct breakpoint b) [static]
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]
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]
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]
static void elf_symtab_read ( struct objfile objfile,
int  type,
long  number_of_symbols,
asymbol **  symbol_table,
int  copy_names 
) [static]
void elfstab_offset_sections ( struct objfile objfile,
struct partial_symtab pst 
)
static void free_elfinfo ( void *  objp) [static]
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]
static VEC ( probe_p  ) [static]

Definition at line 1482 of file elfread.c.

References gdb_assert, probe_ops::get_probes, probe_key, VEC, VEC_iterate, and VEC_reserve.


Variable Documentation

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]
static struct sym_fns elf_sym_fns_lazy_psyms [static]
struct objfile_data* probe_key = NULL [static]

Definition at line 69 of file elfread.c.

Referenced by elf_symfile_relocate_probe(), and VEC().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines