diff options
author | Tom Tromey <tromey@redhat.com> | 2012-05-21 19:47:50 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-05-21 19:47:50 +0000 |
commit | c69ef372db94854dd1d77034692380c36826d32c (patch) | |
tree | 5c3e739f946de48f81d73fbb016ea2703bd49dcb /gdb/gnu-v3-abi.c | |
parent | 595d240f3ac8cddd8d730ef30b2521474855b5ef (diff) | |
download | gdb-c69ef372db94854dd1d77034692380c36826d32c.tar.gz |
PR c++/7173:
* gnu-v3-abi.c (gnuv3_baseclass_offset): Return early for Java
types.
* value.h (value_cast_pointers): Update.
* valops.c (value_cast_pointers): Add 'subclass_check' argument.
(value_cast): Update.
(update_search_result): New function.
(do_search_struct_field): New, from search_struct_field. Check
for ambiguous results.
(search_struct_field): Rewrite.
* infcall.c (value_arg_coerce): Update.
* eval.c (evaluate_subexp_standard) <STRUCTOP_MEMBER>: Use
value_cast_pointers.
* ada-lang.c (ada_convert_actual): Update.
testsuite
* gdb.cp/inherit.exp (test_print_mi_members): Expect errors.
Remove kfails.
(test_print_mi_member_types): Likewise.
Diffstat (limited to 'gdb/gnu-v3-abi.c')
-rw-r--r-- | gdb/gnu-v3-abi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index 42b939d4192..3a83e2d48b5 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -430,8 +430,9 @@ gnuv3_baseclass_offset (struct type *type, int index, ptr_type = builtin_type (gdbarch)->builtin_data_ptr; /* If it isn't a virtual base, this is easy. The offset is in the - type definition. */ - if (!BASETYPE_VIA_VIRTUAL (type, index)) + type definition. Likewise for Java, which doesn't really have + virtual inheritance in the C++ sense. */ + if (!BASETYPE_VIA_VIRTUAL (type, index) || TYPE_CPLUS_REALLY_JAVA (type)) return TYPE_BASECLASS_BITPOS (type, index) / 8; /* To access a virtual base, we need to use the vbase offset stored in |