GDB (xrefs)
Classes | Macros | Functions | Variables
/tmp/gdb-7.10/gdb/elfread.c File Reference
#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 "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
 

Macros

#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 struct symfile_segment_dataelf_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_read_minimal_symbols (struct objfile *objfile, int symfile_flags, const struct elfinfo *ei)
 
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)
 
static VEC (probe_p)
 
static void probe_key_free (bfd *abfd, void *d)
 

Variables

const struct sym_fns elf_sym_fns_gdb_index
 
const struct sym_fns elf_sym_fns_lazy_psyms
 
static const struct bfd_data * probe_key = NULL
 
static const struct objfile_data * 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
 

Macro Definition Documentation

#define ST_DYNAMIC   1

Definition at line 223 of file elfread.c.

Referenced by elf_read_minimal_symbols(), and elf_symtab_read().

#define ST_REGULAR   0

Definition at line 222 of file elfread.c.

Referenced by elf_read_minimal_symbols().

#define ST_SYNTHETIC   2

Definition at line 224 of file elfread.c.

Referenced by elf_read_minimal_symbols(), and elf_symtab_read().

#define SYMBOL_GOT_PLT_SUFFIX   "@got.plt"

Definition at line 74 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_gnu_ifunc_cache_eq ( const void *  a_voidp,
const void *  b_voidp 
)
static

Definition at line 648 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 638 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 176 of file elfread.c.

References elfinfo::mdebugsect, and elfinfo::stabsect.

Referenced by elf_symfile_read().

static void elf_new_init ( struct objfile ignore)
static

Definition at line 1289 of file elfread.c.

References buildsym_new_init(), and stabsread_new_init().

static void elf_read_minimal_symbols ( struct objfile objfile,
int  symfile_flags,
const struct elfinfo ei 
)
static
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 1301 of file elfread.c.

References dwarf2_free_objfile().

static void elf_symfile_init ( struct objfile objfile)
static

Definition at line 1309 of file elfread.c.

References objfile::flags, and OBJF_REORDERED.

static void elf_symfile_read ( struct objfile objfile,
int  symfile_flags 
)
static
static struct symfile_segment_data* elf_symfile_segments ( bfd *  abfd)
static
static void elf_symtab_read ( struct objfile objfile,
int  type,
long  number_of_symbols,
asymbol **  symbol_table,
int  copy_names 
)
static
static void probe_key_free ( bfd *  abfd,
void *  d 
)
static

Definition at line 1354 of file elfread.c.

References probe_ops::destroy, probe::pops, VEC(), VEC_free, and VEC_iterate.

Referenced by _initialize_elfread().

static void read_psyms ( struct objfile objfile)
static

Definition at line 1275 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
static VEC ( probe_p  )
static

Definition at line 1319 of file elfread.c.

References gdb_assert, probe_ops::get_probes, objfile::obfd, probe_key, VEC_iterate, and VEC_reserve.

Referenced by probe_key_free().

Variable Documentation

const struct gnu_ifunc_fns elf_gnu_ifunc_fns
static
Initial value:
=
{
}
static void elf_gnu_ifunc_resolver_stop(struct breakpoint *b)
Definition: elfread.c:891
static int elf_gnu_ifunc_resolve_name(const char *name, CORE_ADDR *addr_p)
Definition: elfread.c:835
static void elf_gnu_ifunc_resolver_return_stop(struct breakpoint *b)
Definition: elfread.c:943
static CORE_ADDR elf_gnu_ifunc_resolve_addr(struct gdbarch *gdbarch, CORE_ADDR pc)
Definition: elfread.c:852

Definition at line 1429 of file elfread.c.

Referenced by _initialize_elfread().

const struct objfile_data* elf_objfile_gnu_ifunc_cache_data
static
const struct sym_probe_fns elf_probe_fns
static
Initial value:
=
{
elf_get_probes,
}

Definition at line 1370 of file elfread.c.

const struct sym_fns elf_sym_fns
static
Initial value:
=
{
NULL,
NULL,
}
static struct symfile_segment_data * elf_symfile_segments(bfd *abfd)
Definition: elfread.c:79
static const struct sym_probe_fns elf_probe_fns
Definition: elfread.c:1370
bfd_byte * default_symfile_relocate(struct objfile *objfile, asection *sectp, bfd_byte *buf)
Definition: symfile.c:3740
static void elf_symfile_finish(struct objfile *objfile)
Definition: elfread.c:1301
static void elf_symfile_init(struct objfile *objfile)
Definition: elfread.c:1309
static void elf_symfile_read(struct objfile *objfile, int symfile_flags)
Definition: elfread.c:1171
const struct quick_symbol_functions psym_functions
Definition: psymtab.c:1466
void default_symfile_offsets(struct objfile *objfile, const struct section_addr_info *addrs)
Definition: symfile.c:722
static void elf_new_init(struct objfile *ignore)
Definition: elfread.c:1289

Definition at line 1377 of file elfread.c.

const struct sym_fns elf_sym_fns_gdb_index
Initial value:
=
{
NULL,
NULL,
}
static struct symfile_segment_data * elf_symfile_segments(bfd *abfd)
Definition: elfread.c:79
static const struct sym_probe_fns elf_probe_fns
Definition: elfread.c:1370
bfd_byte * default_symfile_relocate(struct objfile *objfile, asection *sectp, bfd_byte *buf)
Definition: symfile.c:3740
static void elf_symfile_finish(struct objfile *objfile)
Definition: elfread.c:1301
static void elf_symfile_init(struct objfile *objfile)
Definition: elfread.c:1309
static void elf_symfile_read(struct objfile *objfile, int symfile_flags)
Definition: elfread.c:1171
const struct quick_symbol_functions dwarf2_gdb_index_functions
Definition: dwarf2read.c:4171
void default_symfile_offsets(struct objfile *objfile, const struct section_addr_info *addrs)
Definition: symfile.c:722
static void elf_new_init(struct objfile *ignore)
Definition: elfread.c:1289

Definition at line 1412 of file elfread.c.

Referenced by elf_symfile_read().

const struct sym_fns elf_sym_fns_lazy_psyms
Initial value:
=
{
NULL,
}
static struct symfile_segment_data * elf_symfile_segments(bfd *abfd)
Definition: elfread.c:79
static const struct sym_probe_fns elf_probe_fns
Definition: elfread.c:1370
bfd_byte * default_symfile_relocate(struct objfile *objfile, asection *sectp, bfd_byte *buf)
Definition: symfile.c:3740
static void read_psyms(struct objfile *objfile)
Definition: elfread.c:1275
static void elf_symfile_finish(struct objfile *objfile)
Definition: elfread.c:1301
static void elf_symfile_init(struct objfile *objfile)
Definition: elfread.c:1309
static void elf_symfile_read(struct objfile *objfile, int symfile_flags)
Definition: elfread.c:1171
const struct quick_symbol_functions psym_functions
Definition: psymtab.c:1466
void default_symfile_offsets(struct objfile *objfile, const struct section_addr_info *addrs)
Definition: symfile.c:722
static void elf_new_init(struct objfile *ignore)
Definition: elfread.c:1289

Definition at line 1395 of file elfread.c.

Referenced by elf_symfile_read().

const struct bfd_data* probe_key = NULL
static

Definition at line 67 of file elfread.c.

Referenced by _initialize_elfread(), and VEC().