GDB (xrefs)
Classes | Defines | Typedefs | Enumerations | Functions | Variables
/home/stan/gdb/src/gdb/gnu-v3-abi.c File Reference
#include "defs.h"
#include "value.h"
#include "cp-abi.h"
#include "cp-support.h"
#include "demangle.h"
#include "objfiles.h"
#include "valprint.h"
#include "c-lang.h"
#include "exceptions.h"
#include "typeprint.h"
#include "gdb_assert.h"
#include "gdb_string.h"

Go to the source code of this file.

Classes

struct  value_and_voffset

Defines

#define TYPEINFO_PREFIX   "typeinfo for "
#define TYPEINFO_PREFIX_LEN   (sizeof (TYPEINFO_PREFIX) - 1)

Typedefs

typedef struct value_and_voffsetvalue_and_voffset_p

Enumerations

enum  { vtable_field_vcall_and_vbase_offsets, vtable_field_offset_to_top, vtable_field_type_info, vtable_field_virtual_functions }

Functions

static int gnuv3_is_vtable_name (const char *name)
static int gnuv3_is_operator_name (const char *name)
static void * build_gdb_vtable_type (struct gdbarch *arch)
static struct typevtable_ptrdiff_type (struct gdbarch *gdbarch)
static int vtable_address_point_offset (struct gdbarch *gdbarch)
static int gnuv3_dynamic_class (struct type *type)
static struct valuegnuv3_get_vtable (struct gdbarch *gdbarch, struct type *container_type, CORE_ADDR container_addr)
static struct typegnuv3_rtti_type (struct value *value, int *full_p, int *top_p, int *using_enc_p)
static struct valuegnuv3_get_virtual_fn (struct gdbarch *gdbarch, struct value *container, struct type *fntype, int vtable_index)
static struct valuegnuv3_virtual_fn_field (struct value **value_p, struct fn_field *f, int j, struct type *vfn_base, int offset)
static int gnuv3_baseclass_offset (struct type *type, int index, const bfd_byte *valaddr, int embedded_offset, CORE_ADDR address, const struct value *val)
static const char * gnuv3_find_method_in (struct type *domain, CORE_ADDR voffset, LONGEST adjustment)
static int gnuv3_decode_method_ptr (struct gdbarch *gdbarch, const gdb_byte *contents, CORE_ADDR *value_p, LONGEST *adjustment_p)
static void gnuv3_print_method_ptr (const gdb_byte *contents, struct type *type, struct ui_file *stream)
static int gnuv3_method_ptr_size (struct type *type)
static void gnuv3_make_method_ptr (struct type *type, gdb_byte *contents, CORE_ADDR value, int is_virtual)
static struct valuegnuv3_method_ptr_to_value (struct value **this_p, struct value *method_ptr)
 DEF_VEC_P (value_and_voffset_p)
static hashval_t hash_value_and_voffset (const void *p)
static int eq_value_and_voffset (const void *a, const void *b)
static int compare_value_and_voffset (const void *a, const void *b)
static void compute_vtable_size (htab_t offset_hash, VEC(value_and_voffset_p)**offset_vec, struct value *value)
static void print_one_vtable (struct gdbarch *gdbarch, struct value *value, int max_voffset, struct value_print_options *opts)
static void gnuv3_print_vtable (struct value *value)
static void * build_std_type_info_type (struct gdbarch *arch)
static struct typegnuv3_get_typeid_type (struct gdbarch *gdbarch)
static struct valuegnuv3_get_typeid (struct value *value)
static char * gnuv3_get_typename_from_type_info (struct value *type_info_ptr)
static struct typegnuv3_get_type_from_type_info (struct value *type_info_ptr)
static CORE_ADDR gnuv3_skip_trampoline (struct frame_info *frame, CORE_ADDR stop_pc)
static int gnuv3_pass_by_reference (struct type *type)
static void init_gnuv3_ops (void)
void _initialize_gnu_v3_abi (void)

Variables

static struct cp_abi_ops gnu_v3_abi_ops
static struct gdbarch_datastd_type_info_gdbarch_data
static struct gdbarch_datavtable_type_gdbarch_data
initialize_file_ftype _initialize_gnu_v3_abi

Define Documentation

#define TYPEINFO_PREFIX   "typeinfo for "
#define TYPEINFO_PREFIX_LEN   (sizeof (TYPEINFO_PREFIX) - 1)

Typedef Documentation

Definition at line 768 of file gnu-v3-abi.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
vtable_field_vcall_and_vbase_offsets 
vtable_field_offset_to_top 
vtable_field_type_info 
vtable_field_virtual_functions 

Definition at line 97 of file gnu-v3-abi.c.


Function Documentation

void _initialize_gnu_v3_abi ( void  )
static void* build_gdb_vtable_type ( struct gdbarch arch) [static]
static void* build_std_type_info_type ( struct gdbarch arch) [static]
static int compare_value_and_voffset ( const void *  a,
const void *  b 
) [static]

Definition at line 796 of file gnu-v3-abi.c.

References value_address(), and value_embedded_offset().

Referenced by gnuv3_print_vtable().

static void compute_vtable_size ( htab_t  offset_hash,
VEC(value_and_voffset_p)**  offset_vec,
struct value value 
) [static]
static int eq_value_and_voffset ( const void *  a,
const void *  b 
) [static]

Definition at line 784 of file gnu-v3-abi.c.

References value_and_voffset::value, value_address(), and value_embedded_offset().

Referenced by gnuv3_print_vtable().

static int gnuv3_baseclass_offset ( struct type type,
int  index,
const bfd_byte *  valaddr,
int  embedded_offset,
CORE_ADDR  address,
const struct value val 
) [static]
static int gnuv3_decode_method_ptr ( struct gdbarch gdbarch,
const gdb_byte contents,
CORE_ADDR value_p,
LONGEST adjustment_p 
) [static]
static int gnuv3_dynamic_class ( struct type type) [static]
static const char* gnuv3_find_method_in ( struct type domain,
CORE_ADDR  voffset,
LONGEST  adjustment 
) [static]
static struct type* gnuv3_get_type_from_type_info ( struct value type_info_ptr) [static, read]
static struct value* gnuv3_get_typeid ( struct value value) [static, read]
static struct type* gnuv3_get_typeid_type ( struct gdbarch gdbarch) [static, read]

Definition at line 1045 of file gnu-v3-abi.c.

References gdbarch_data(), lookup_symbol(), STRUCT_DOMAIN, and SYMBOL_TYPE.

Referenced by gnuv3_get_typeid(), and init_gnuv3_ops().

static char* gnuv3_get_typename_from_type_info ( struct value type_info_ptr) [static]
static struct value* gnuv3_get_virtual_fn ( struct gdbarch gdbarch,
struct value container,
struct type fntype,
int  vtable_index 
) [static, read]
static struct value* gnuv3_get_vtable ( struct gdbarch gdbarch,
struct type container_type,
CORE_ADDR  container_addr 
) [static, read]
static int gnuv3_is_operator_name ( const char *  name) [static]

Definition at line 50 of file gnu-v3-abi.c.

Referenced by init_gnuv3_ops().

static int gnuv3_is_vtable_name ( const char *  name) [static]

Definition at line 44 of file gnu-v3-abi.c.

Referenced by init_gnuv3_ops().

static void gnuv3_make_method_ptr ( struct type type,
gdb_byte contents,
CORE_ADDR  value,
int  is_virtual 
) [static]
static int gnuv3_method_ptr_size ( struct type type) [static]

Definition at line 661 of file gnu-v3-abi.c.

References get_type_arch(), and TYPE_LENGTH.

Referenced by init_gnuv3_ops().

static struct value* gnuv3_method_ptr_to_value ( struct value **  this_p,
struct value method_ptr 
) [static, read]
static int gnuv3_pass_by_reference ( struct type type) [static]
static void gnuv3_print_method_ptr ( const gdb_byte contents,
struct type type,
struct ui_file stream 
) [static]
static void gnuv3_print_vtable ( struct value value) [static]
static struct type* gnuv3_rtti_type ( struct value value,
int full_p,
int top_p,
int using_enc_p 
) [static, read]
static CORE_ADDR gnuv3_skip_trampoline ( struct frame_info frame,
CORE_ADDR  stop_pc 
) [static]
static struct value* gnuv3_virtual_fn_field ( struct value **  value_p,
struct fn_field *  f,
int  j,
struct type vfn_base,
int  offset 
) [static, read]
static hashval_t hash_value_and_voffset ( const void *  p) [static]

Definition at line 774 of file gnu-v3-abi.c.

References value_and_voffset::value, value_address(), and value_embedded_offset().

Referenced by gnuv3_print_vtable().

static void init_gnuv3_ops ( void  ) [static]
static void print_one_vtable ( struct gdbarch gdbarch,
struct value value,
int  max_voffset,
struct value_print_options opts 
) [static]
static int vtable_address_point_offset ( struct gdbarch gdbarch) [static]
static struct type* vtable_ptrdiff_type ( struct gdbarch gdbarch) [static, read]

Variable Documentation

Referenced by initialize_all_files().

struct cp_abi_ops gnu_v3_abi_ops [static]

Definition at line 35 of file gnu-v3-abi.c.

Referenced by _initialize_gnu_v3_abi(), and init_gnuv3_ops().

Definition at line 40 of file gnu-v3-abi.c.

Definition at line 93 of file gnu-v3-abi.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines