]>
Commit | Line | Data |
---|---|---|
3a58abaf AM |
1 | 2005-03-24 Jeff Johnston <jjohnstn@redhat.com> |
2 | ||
3 | * valops.c (check_field_in): Use check_typedef for base classes | |
4 | to avoid problems with opaque type references. | |
5 | ||
6 | Index: gdb-6.8.50.20081128/gdb/valops.c | |
7 | =================================================================== | |
8 | --- gdb-6.8.50.20081128.orig/gdb/valops.c 2008-12-08 10:56:11.000000000 +0100 | |
9 | +++ gdb-6.8.50.20081128/gdb/valops.c 2008-12-08 10:59:14.000000000 +0100 | |
10 | @@ -2484,8 +2484,14 @@ check_field (struct type *type, const ch | |
11 | } | |
12 | ||
13 | for (i = TYPE_N_BASECLASSES (type) - 1; i >= 0; i--) | |
14 | - if (check_field (TYPE_BASECLASS (type, i), name)) | |
15 | - return 1; | |
16 | + { | |
17 | + /* Check the base classes. Make sure we have the real type for | |
18 | + each base class as opposed to an opaque declaration. */ | |
19 | + struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i)); | |
20 | + | |
21 | + if (check_field (baseclass, name)) | |
22 | + return 1; | |
23 | + } | |
24 | ||
25 | return 0; | |
26 | } |