diff options
author | Daniel Jacobowitz <dan@debian.org> | 2002-10-02 22:01:53 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2002-10-02 22:01:53 +0000 |
commit | 06c2f0e3cc15af2ec9fa64cc943f1dc5ff9c44f3 (patch) | |
tree | ea973e50bf6bfae4d772d5f6e0ae9ee526998199 /gdb/gdbtypes.c | |
parent | 6748b0ff2d77f4381bebc390cea17f8f120eb9b4 (diff) | |
download | gdb-06c2f0e3cc15af2ec9fa64cc943f1dc5ff9c44f3.tar.gz |
Fix PR gdb/778
* gdbtypes.c (fill_in_vptr_fieldno): Call check_typedef
before recursing.
* gnu-v3-abi.c (gnuv3_virtual_fn_field): Check return value
of fill_in_vptr_fieldno.
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r-- | gdb/gdbtypes.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 40223943b7c..3ef1828cd40 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -1276,13 +1276,12 @@ fill_in_vptr_fieldno (struct type *type) virtual (and hence we cannot share the table pointer). */ for (i = 0; i < TYPE_N_BASECLASSES (type); i++) { - fill_in_vptr_fieldno (TYPE_BASECLASS (type, i)); - if (TYPE_VPTR_FIELDNO (TYPE_BASECLASS (type, i)) >= 0) + struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i)); + fill_in_vptr_fieldno (baseclass); + if (TYPE_VPTR_FIELDNO (baseclass) >= 0) { - TYPE_VPTR_FIELDNO (type) - = TYPE_VPTR_FIELDNO (TYPE_BASECLASS (type, i)); - TYPE_VPTR_BASETYPE (type) - = TYPE_VPTR_BASETYPE (TYPE_BASECLASS (type, i)); + TYPE_VPTR_FIELDNO (type) = TYPE_VPTR_FIELDNO (baseclass); + TYPE_VPTR_BASETYPE (type) = TYPE_VPTR_BASETYPE (baseclass); break; } } |