2005-03-25 00:17:33 +00:00
|
|
|
2005-03-24 Jeff Johnston <jjohnstn@redhat.com>
|
|
|
|
|
|
|
|
* valops.c (check_field_in): Use check_typedef for base classes
|
|
|
|
to avoid problems with opaque type references.
|
|
|
|
|
2008-12-14 14:05:20 +00:00
|
|
|
Index: gdb-6.8.50.20081128/gdb/valops.c
|
2006-07-11 06:33:02 +00:00
|
|
|
===================================================================
|
2008-12-14 14:05:20 +00:00
|
|
|
--- gdb-6.8.50.20081128.orig/gdb/valops.c 2008-12-08 10:56:11.000000000 +0100
|
|
|
|
+++ gdb-6.8.50.20081128/gdb/valops.c 2008-12-08 10:59:14.000000000 +0100
|
|
|
|
@@ -2484,8 +2484,14 @@ check_field (struct type *type, const ch
|
2005-03-25 00:17:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
|
2008-12-14 14:05:20 +00:00
|
|
|
- if (check_field (TYPE_BASECLASS (type, i), name))
|
2005-03-25 00:17:33 +00:00
|
|
|
- return 1;
|
|
|
|
+ {
|
2006-07-11 06:33:02 +00:00
|
|
|
+ /* Check the base classes. Make sure we have the real type for
|
2005-03-25 00:17:33 +00:00
|
|
|
+ each base class as opposed to an opaque declaration. */
|
|
|
|
+ struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
|
2008-12-14 14:05:20 +00:00
|
|
|
+
|
|
|
|
+ if (check_field (baseclass, name))
|
|
|
|
+ return 1;
|
2005-03-25 00:17:33 +00:00
|
|
|
+ }
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|