|
|
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 |
|
|
|
2b9b6c1 |
--- gdb-6.3/gdb/valops.c.fix 2005-03-24 19:07:09.000000000 -0500
|
|
|
2b9b6c1 |
+++ gdb-6.3/gdb/valops.c 2005-03-24 19:08:31.000000000 -0500
|
|
|
2b9b6c1 |
@@ -1,6 +1,6 @@
|
|
|
2b9b6c1 |
/* Perform non-arithmetic operations on values, for GDB.
|
|
|
2b9b6c1 |
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
|
|
|
2b9b6c1 |
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
|
|
2b9b6c1 |
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
|
|
2b9b6c1 |
Free Software Foundation, Inc.
|
|
|
2b9b6c1 |
|
|
|
2b9b6c1 |
This file is part of GDB.
|
|
|
2b9b6c1 |
@@ -2315,8 +2315,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 |
+ {
|
|
|
2b9b6c1 |
+ /* 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 |
}
|