40 || startswith (
name,
"__dt__"))
49 if ((
name[0] ==
'_' &&
name[1] ==
'_'
50 && (isdigit (
name[2]) || strchr (
"Qt",
name[2])))
51 || startswith (
name,
"__ct__"))
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);
135 if (vtbl->
type ()->
code () == TYPE_CODE_PTR
158 if (entry_type->
code () == TYPE_CODE_STRUCT)
172 else if (entry_type->
code () == TYPE_CODE_PTR)
175 error (_(
"I'm confused: virtual function table has bad type"));
187 struct type *known_type;
188 struct type *rtti_type;
192 const char *linkage_name;
194 struct type *known_type_vptr_basetype;
195 int known_type_vptr_fieldno;
205 known_type = v->
type ();
208 if (known_type->
code () != TYPE_CODE_STRUCT)
218 &known_type_vptr_basetype);
221 if (known_type_vptr_fieldno < 0)
226 btype = known_type_vptr_basetype;
228 if (btype != known_type )
237 if (
value_field (v, known_type_vptr_fieldno)->address () == 0)
250 gdb::unique_xmalloc_ptr<char> demangled_name
252 p = strchr (demangled_name.get (),
' ');
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;
307 field_class_name =
name + 5;
309 if (field_class_name == NULL)
316 if (fieldtype == NULL
317 || fieldtype->
code () != TYPE_CODE_PTR)
328 if (basetype->
name () != NULL
330 && strcmp (basetype->
name (),
343 const bfd_byte *valaddr, LONGEST embedded_offset,
344 CORE_ADDR address,
const struct value *val)
356 for (i = n_baseclasses; i < len; i++)
360 struct type *field_type;
361 LONGEST field_offset;
367 field_length = field_type->
length ();
371 throw_error (NOT_AVAILABLE_ERROR,
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"));
int register_cp_abi(struct cp_abi_ops *abi)
int is_vtable_name(const char *name)
gdb::unique_xmalloc_ptr< char > gdb_demangle(const char *name, int options)
struct type * cp_lookup_rtti_type(const char *name, const struct block *block)
bool is_cplus_marker(int c)
struct type * lookup_pointer_type(struct type *type)
int get_vptr_fieldno(struct type *type, struct type **basetypep)
struct type * check_typedef(struct type *type)
#define TYPE_VPTR_BASETYPE(thistype)
#define TYPE_FN_FIELD_VOFFSET(thisfn, n)
#define TYPE_FN_FIELD_TYPE(thisfn, n)
#define TYPE_BASECLASS(thistype, index)
#define TYPE_BASECLASS_BITPOS(thistype, index)
#define TYPE_VPTR_FIELDNO(thistype)
#define BASETYPE_VIA_VIRTUAL(thistype, index)
#define TYPE_N_BASECLASSES(thistype)
#define TYPE_FN_FIELD_FCONTEXT(thisfn, n)
void _initialize_gnu_v2_abi()
static int gnuv2_is_operator_name(const char *name)
static enum ctor_kinds gnuv2_is_constructor_name(const char *name)
static struct type * gnuv2_value_rtti_type(struct value *v, int *full, LONGEST *top, int *using_enc)
static enum dtor_kinds gnuv2_is_destructor_name(const char *name)
static struct value * gnuv2_virtual_fn_field(struct value **arg1p, struct fn_field *f, int j, struct type *type, int offset)
static int gnuv2_is_vtable_name(const char *name)
static cp_abi_ops gnu_v2_abi_ops
static int vb_match(struct type *, int, struct type *)
static int gnuv2_baseclass_offset(struct type *type, int index, const bfd_byte *valaddr, LONGEST embedded_offset, CORE_ADDR address, const struct value *val)
static void init_gnuv2_ops(void)
struct bound_minimal_symbol lookup_minimal_symbol_by_pc(CORE_ADDR pc)
struct minimal_symbol * minsym
int(* baseclass_offset)(struct type *type, int index, const bfd_byte *valaddr, LONGEST embedded_offset, CORE_ADDR address, const struct value *val)
int(* is_vtable_name)(const char *name)
enum ctor_kinds(* is_constructor_name)(const char *name)
struct value *(* virtual_fn_field)(struct value **arg1p, struct fn_field *f, int j, struct type *type, int offset)
enum dtor_kinds(* is_destructor_name)(const char *name)
int(* is_operator_name)(const char *name)
struct type *(* rtti_type)(struct value *v, int *full, LONGEST *top, int *using_enc)
LONGEST loc_bitpos() const
const char * name() const
struct type * type() const
const char * linkage_name() const
struct type * target_type() const
struct field & field(int idx) const
unsigned int num_fields() const
const char * name() const
struct value * primitive_field(LONGEST offset, int fieldno, struct type *arg_type)
bool bytes_available(LONGEST offset, ULONGEST length) const
struct type * type() const
void set_offset(LONGEST offset)
void deprecated_set_type(struct type *type)
struct value * value_subscript(struct value *array, LONGEST index)
struct value * value_ptradd(struct value *arg1, LONGEST arg2)
struct value * value_addr(struct value *arg1)
struct value * value_cast(struct type *type, struct value *arg2)
struct value * value_ind(struct value *arg1)
struct value * value_field(struct value *arg1, int fieldno)
CORE_ADDR unpack_pointer(struct type *type, const gdb_byte *valaddr)
CORE_ADDR value_as_address(struct value *val)
LONGEST value_as_long(struct value *val)