2b9b6c1
2005-03-24  Jeff Johnston  <jjohnstn@redhat.com>
2b9b6c1
2b9b6c1
	* valops.c (check_field_in): Use check_typedef for base classes
2b9b6c1
	to avoid problems with opaque type references.
2b9b6c1
9231e41
Index: gdb-6.5/gdb/valops.c
9231e41
===================================================================
9231e41
--- gdb-6.5.orig/gdb/valops.c	2005-12-17 20:34:03.000000000 -0200
9231e41
+++ gdb-6.5/gdb/valops.c	2006-07-07 02:35:09.000000000 -0300
9231e41
@@ -2257,8 +2257,13 @@ check_field_in (struct type *type, const
2b9b6c1
     }
2b9b6c1
 
2b9b6c1
   for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
2b9b6c1
-    if (check_field_in (TYPE_BASECLASS (type, i), name))
2b9b6c1
-      return 1;
2b9b6c1
+    {
9231e41
+      /* Check the base classes.  Make sure we have the real type for
2b9b6c1
+         each base class as opposed to an opaque declaration.  */
2b9b6c1
+      struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
2b9b6c1
+      if (check_field_in (baseclass, name))
2b9b6c1
+        return 1;
2b9b6c1
+    }
2b9b6c1
 
2b9b6c1
   return 0;
2b9b6c1
 }