49 if ((name[0] ==
'_' && name[1] ==
'_'
50 && (isdigit (name[2]) || strchr (
"Qt", name[2])))
60 return (((name)[0] ==
'_'
61 && (((name)[1] ==
'V' && (name)[2] ==
'T')
62 || ((name)[1] ==
'v' && (name)[2] ==
't'))
64 ((name)[0] ==
'_' && (name)[1] ==
'_'
65 && (name)[2] ==
'v' && (name)[3] ==
't' && (name)[4] ==
'_'));
87 struct value *arg1 = *arg1p;
89 struct type *entry_type;
100 struct type *context_vptr_basetype;
101 int context_vptr_fieldno;
103 if (fcontext == NULL)
131 context_vptr_basetype);
175 error (
_(
"I'm confused: virtual function table has bad type"));
188 struct type *known_type;
189 struct type *rtti_type;
192 char *demangled_name, *p;
193 const char *linkage_name;
195 struct type *known_type_vptr_basetype;
196 int known_type_vptr_fieldno;
219 &known_type_vptr_basetype);
222 if (known_type_vptr_fieldno < 0)
227 btype = known_type_vptr_basetype;
229 if (btype != known_type )
251 demangled_name=
gdb_demangle(linkage_name,DMGL_PARAMS|DMGL_ANSI);
252 p = strchr (demangled_name,
' ');
259 if (rtti_type == NULL)
267 if (top && ((*top) >0))
296 struct type *fieldtype;
298 const char *field_class_name = NULL;
304 field_class_name = name + 4;
306 if (name[1] ==
'_' && name[2] ==
'v' && name[3] ==
'b' && name[4] ==
'_')
307 field_class_name = name + 5;
309 if (field_class_name == NULL)
316 if (fieldtype == NULL
343 const bfd_byte *valaddr,
int embedded_offset,
356 for (i = n_baseclasses; i <
len; i++)
360 struct type *field_type;
372 _(
"Virtual baseclass pointer is not available"));
375 valaddr + embedded_offset + field_offset);
377 return addr - (
LONGEST) address + embedded_offset;
381 for (i = index + 1; i < n_baseclasses; i++)
388 embedded_offset, address, val);
394 error (
_(
"Baseclass offset not found"));
struct value * value_addr(struct value *arg1)
struct value * value_primitive_field(struct value *arg1, int offset, int fieldno, struct type *arg_type)
int(* is_vtable_name)(const char *name)
struct value * value_subscript(struct value *array, LONGEST index)
#define MSYMBOL_LINKAGE_NAME(symbol)
int get_vptr_fieldno(struct type *type, struct type **basetypep)
#define TYPE_FIELD_NAME(thistype, n)
#define TYPE_N_BASECLASSES(thistype)
int value_offset(const struct value *value)
CORE_ADDR unpack_pointer(struct type *type, const gdb_byte *valaddr)
LONGEST value_as_long(struct value *val)
#define TYPE_NAME(thistype)
static struct type * gnuv2_value_rtti_type(struct value *v, int *full, int *top, int *using_enc)
static enum dtor_kinds gnuv2_is_destructor_name(const char *name)
#define BASETYPE_VIA_VIRTUAL(thistype, index)
void set_value_lazy(struct value *value, int val)
struct value * value_ind(struct value *arg1)
enum ctor_kinds(* is_constructor_name)(const char *name)
#define TYPE_FIELD_TYPE(thistype, n)
enum dtor_kinds(* is_destructor_name)(const char *name)
initialize_file_ftype _initialize_gnu_v2_abi
void deprecated_set_value_type(struct value *value, struct type *type)
static int gnuv2_baseclass_offset(struct type *type, int index, const bfd_byte *valaddr, int embedded_offset, CORE_ADDR address, const struct value *val)
static enum ctor_kinds gnuv2_is_constructor_name(const char *name)
struct value * value_ptradd(struct value *arg1, LONGEST arg2)
#define TYPE_VPTR_FIELDNO(thistype)
static int gnuv2_is_operator_name(const char *name)
int is_cplus_marker(int c)
char * gdb_demangle(const char *name, int options)
static struct value * gnuv2_virtual_fn_field(struct value **arg1p, struct fn_field *f, int j, struct type *type, int offset)
struct type * check_typedef(struct type *type)
struct value * value_field(struct value *arg1, int fieldno)
struct type * cp_lookup_rtti_type(const char *name, struct block *block)
void initialize_file_ftype(void)
int value_lazy(struct value *value)
int register_cp_abi(struct cp_abi_ops *abi)
static void init_gnuv2_ops(void)
struct cp_abi_ops gnu_v2_abi_ops
int is_vtable_name(const char *name)
int(* baseclass_offset)(struct type *type, int index, const bfd_byte *valaddr, int embedded_offset, CORE_ADDR address, const struct value *val)
static int startswith(const char *string, const char *pattern)
void set_value_offset(struct value *value, int offset)
struct value * value_cast(struct type *type, struct value *arg2)
#define TYPE_BASECLASS(thistype, index)
static int gnuv2_is_vtable_name(const char *name)
#define TYPE_FIELD_BITPOS(thistype, n)
#define TYPE_FN_FIELD_VOFFSET(thisfn, n)
#define TYPE_FN_FIELD_TYPE(thisfn, n)
int(* is_operator_name)(const char *name)
#define TYPE_TARGET_TYPE(thistype)
void value_fetch_lazy(struct value *val)
struct bound_minimal_symbol lookup_minimal_symbol_by_pc(CORE_ADDR pc)
#define TYPE_FN_FIELD_FCONTEXT(thisfn, n)
#define TYPE_CODE(thistype)
struct minimal_symbol * minsym
#define TYPE_VPTR_BASETYPE(thistype)
#define TYPE_NFIELDS(thistype)
int value_bytes_available(const struct value *value, int offset, int length)
#define CHECK_TYPEDEF(TYPE)
struct type * value_type(const struct value *value)
CORE_ADDR value_as_address(struct value *val)
#define TYPE_LENGTH(thistype)
#define TYPE_BASECLASS_BITPOS(thistype, index)
struct type *(* rtti_type)(struct value *v, int *full, int *top, int *using_enc)
static int vb_match(struct type *, int, struct type *)
CORE_ADDR value_address(const struct value *value)
void error(const char *fmt,...)
struct type * lookup_pointer_type(struct type *type)
void throw_error(enum errors error, const char *fmt,...)
struct value *(* virtual_fn_field)(struct value **arg1p, struct fn_field *f, int j, struct type *type, int offset)
const ULONGEST const LONGEST len