diff options
Diffstat (limited to 'gdb/gnu-v3-abi.c')
-rw-r--r-- | gdb/gnu-v3-abi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index 0b80571..25a437b 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -411,8 +411,9 @@ gnuv3_virtual_fn_field (struct value **value_p, -1 is returned on error. */ static int -gnuv3_baseclass_offset (struct type *type, int index, const bfd_byte *valaddr, - CORE_ADDR address) +gnuv3_baseclass_offset (struct type *type, int index, + const bfd_byte *valaddr, int embedded_offset, + CORE_ADDR address, const struct value *val) { struct gdbarch *gdbarch; struct type *ptr_type; @@ -443,7 +444,7 @@ gnuv3_baseclass_offset (struct type *type, int index, const bfd_byte *valaddr, error (_("Misaligned vbase offset.")); cur_base_offset = cur_base_offset / ((int) TYPE_LENGTH (ptr_type)); - vtable = gnuv3_get_vtable (gdbarch, type, address); + vtable = gnuv3_get_vtable (gdbarch, type, address + embedded_offset); gdb_assert (vtable != NULL); vbase_array = value_field (vtable, vtable_field_vcall_and_vbase_offsets); base_offset = value_as_long (value_subscript (vbase_array, cur_base_offset)); |