forked from Imagelibrary/binutils-gdb
* values.c (value_primitive_field): Add embedded_offset to the
address of structure members.
* gnu-v3-abi.c (gnuv3_rtti_type): Cast to base type before
attempting to access vtable pointer. Set using_enc_p if we cast.
(gnuv3_virtual_fn_field): Call value_cast with structure rather than
structure pointer. Cast to base type before attempting to access
vtable pointer.
This commit is contained in:
@@ -929,7 +929,8 @@ value_primitive_field (register value_ptr arg1, int offset,
|
||||
memcpy (VALUE_CONTENTS_RAW (v),
|
||||
VALUE_CONTENTS_RAW (arg1) + offset,
|
||||
TYPE_LENGTH (type));
|
||||
VALUE_OFFSET (v) = VALUE_OFFSET (arg1) + offset;
|
||||
VALUE_OFFSET (v) = VALUE_OFFSET (arg1) + offset
|
||||
+ VALUE_EMBEDDED_OFFSET (arg1);
|
||||
}
|
||||
VALUE_LVAL (v) = VALUE_LVAL (arg1);
|
||||
if (VALUE_LVAL (arg1) == lval_internalvar)
|
||||
|
||||
Reference in New Issue
Block a user