GNU Binutils with patches for OS216
Revision | 1b1d112451c4fe26fc741f5860919bfb41d99822 (tree) |
---|---|
Time | 2004-03-10 02:10:19 |
Author | Daniel Jacobowitz <drow@fals...> |
Commiter | Daniel Jacobowitz |
* arm-tdep.c (arm_use_struct_convention): Look through typedefs.
* gdbtypes.c (check_typedef): Update comments.
@@ -1,5 +1,10 @@ | ||
1 | 1 | 2004-03-09 Daniel Jacobowitz <drow@mvista.com> |
2 | 2 | |
3 | + * arm-tdep.c (arm_use_struct_convention): Look through typedefs. | |
4 | + * gdbtypes.c (check_typedef): Update comments. | |
5 | + | |
6 | +2004-03-09 Daniel Jacobowitz <drow@mvista.com> | |
7 | + | |
3 | 8 | * arm-tdep.c (thumb_get_next_pc): Handle Thumb BLX. |
4 | 9 | |
5 | 10 | 2004-03-07 Daniel Jacobowitz <drow@mvista.com> |
@@ -2173,6 +2173,8 @@ arm_use_struct_convention (int gcc_p, struct type *type) | ||
2173 | 2173 | int nRc; |
2174 | 2174 | enum type_code code; |
2175 | 2175 | |
2176 | + CHECK_TYPEDEF (type); | |
2177 | + | |
2176 | 2178 | /* In the ARM ABI, "integer" like aggregate types are returned in |
2177 | 2179 | registers. For an aggregate type to be integer like, its size |
2178 | 2180 | must be less than or equal to DEPRECATED_REGISTER_SIZE and the |
@@ -2230,7 +2232,7 @@ arm_use_struct_convention (int gcc_p, struct type *type) | ||
2230 | 2232 | for (i = 0; i < TYPE_NFIELDS (type); i++) |
2231 | 2233 | { |
2232 | 2234 | enum type_code field_type_code; |
2233 | - field_type_code = TYPE_CODE (TYPE_FIELD_TYPE (type, i)); | |
2235 | + field_type_code = TYPE_CODE (check_typedef (TYPE_FIELD_TYPE (type, i))); | |
2234 | 2236 | |
2235 | 2237 | /* Is it a floating point type field? */ |
2236 | 2238 | if (field_type_code == TYPE_CODE_FLT) |
@@ -1343,6 +1343,12 @@ get_destructor_fn_field (struct type *t, int *method_indexp, int *field_indexp) | ||
1343 | 1343 | return 0; |
1344 | 1344 | } |
1345 | 1345 | |
1346 | +static void | |
1347 | +stub_noname_complaint (void) | |
1348 | +{ | |
1349 | + complaint (&symfile_complaints, "stub type has NULL name"); | |
1350 | +} | |
1351 | + | |
1346 | 1352 | /* Added by Bryan Boreham, Kewill, Sun Sep 17 18:07:17 1989. |
1347 | 1353 | |
1348 | 1354 | If this is a stubbed struct (i.e. declared as struct foo *), see if |
@@ -1356,11 +1362,10 @@ get_destructor_fn_field (struct type *t, int *method_indexp, int *field_indexp) | ||
1356 | 1362 | This used to be coded as a macro, but I don't think it is called |
1357 | 1363 | often enough to merit such treatment. */ |
1358 | 1364 | |
1359 | -static void | |
1360 | -stub_noname_complaint (void) | |
1361 | -{ | |
1362 | - complaint (&symfile_complaints, "stub type has NULL name"); | |
1363 | -} | |
1365 | +/* Find the real type of TYPE. This function returns the real type, after | |
1366 | + removing all layers of typedefs and completing opaque or stub types. | |
1367 | + Completion changes the TYPE argument, but stripping of typedefs does | |
1368 | + not. */ | |
1364 | 1369 | |
1365 | 1370 | struct type * |
1366 | 1371 | check_typedef (struct type *type) |