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);
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"));
188 struct type *known_type;
189 struct type *rtti_type;
193 const char *linkage_name;
195 struct type *known_type_vptr_basetype;
196 int known_type_vptr_fieldno;
209 if (known_type->
code () != TYPE_CODE_STRUCT)
219 &known_type_vptr_basetype);
222 if (known_type_vptr_fieldno < 0)
227 btype = known_type_vptr_basetype;
229 if (btype != known_type )
251 gdb::unique_xmalloc_ptr<char> demangled_name
253 p = strchr (demangled_name.get (),
' ');
260 if (rtti_type == NULL)
268 if (top && ((*top) >0))
297 struct type *fieldtype;
299 const char *field_class_name = NULL;
305 field_class_name =
name + 4;
308 field_class_name =
name + 5;
310 if (field_class_name == NULL)
317 if (fieldtype == NULL
318 || fieldtype->
code () != TYPE_CODE_PTR)
329 if (basetype->
name () != NULL
331 && strcmp (basetype->
name (),
344 const bfd_byte *valaddr, LONGEST embedded_offset,
345 CORE_ADDR address,
const struct value *val)
357 for (i = n_baseclasses; i < len; i++)
361 struct type *field_type;
362 LONGEST field_offset;
368 field_length = field_type->
length ();
372 throw_error (NOT_AVAILABLE_ERROR,
373 _(
"Virtual baseclass pointer is not available"));
376 valaddr + embedded_offset + field_offset);
378 return addr - (LONGEST) address + embedded_offset;
382 for (i = index + 1; i < n_baseclasses; i++)
389 embedded_offset, address, val);
395 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
const char * name() const
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)
int value_bytes_available(const struct value *value, LONGEST offset, LONGEST length)
struct type * value_type(const struct value *value)
LONGEST value_offset(const struct value *value)
int value_lazy(const struct value *value)
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)
void value_fetch_lazy(struct value *val)
struct value * value_primitive_field(struct value *arg1, LONGEST offset, int fieldno, struct type *arg_type)
void set_value_offset(struct value *value, LONGEST offset)
CORE_ADDR value_address(const struct value *value)
LONGEST value_as_long(struct value *val)
void deprecated_set_value_type(struct value *value, struct type *type)
void set_value_lazy(struct value *value, int val)