32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
|
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.
|
||
|
|
||
|
--- gdb-6.3/gdb/valops.c.fix 2005-03-24 19:07:09.000000000 -0500
|
||
|
+++ gdb-6.3/gdb/valops.c 2005-03-24 19:08:31.000000000 -0500
|
||
|
@@ -1,6 +1,6 @@
|
||
|
/* Perform non-arithmetic operations on values, for GDB.
|
||
|
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
|
||
|
- 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||
|
+ 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||
|
Free Software Foundation, Inc.
|
||
|
|
||
|
This file is part of GDB.
|
||
|
@@ -2315,8 +2315,13 @@ check_field_in (struct type *type, const
|
||
|
}
|
||
|
|
||
|
for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--)
|
||
|
- if (check_field_in (TYPE_BASECLASS (type, i), name))
|
||
|
- return 1;
|
||
|
+ {
|
||
|
+ /* Check the base classes. Make sure we have the real type for
|
||
|
+ each base class as opposed to an opaque declaration. */
|
||
|
+ struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
|
||
|
+ if (check_field_in (baseclass, name))
|
||
|
+ return 1;
|
||
|
+ }
|
||
|
|
||
|
return 0;
|
||
|
}
|