]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* arm-tdep.c (arm_use_struct_convention): Look through typedefs.
authorDaniel Jacobowitz <drow@false.org>
Tue, 9 Mar 2004 17:08:25 +0000 (17:08 +0000)
committerDaniel Jacobowitz <drow@false.org>
Tue, 9 Mar 2004 17:08:25 +0000 (17:08 +0000)
* gdbtypes.c (check_typedef): Update comments.

gdb/ChangeLog
gdb/arm-tdep.c
gdb/gdbtypes.c

index cc9c0af39acd275dfa986bb4455816202ebf391e..8ae0ed28b07f2e26bee050344c829d452c37c0e2 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-09  Daniel Jacobowitz  <drow@mvista.com>
+
+       * arm-tdep.c (arm_use_struct_convention): Look through typedefs.
+       * gdbtypes.c (check_typedef): Update comments.
+
 2004-03-09  Daniel Jacobowitz  <drow@mvista.com>
 
        * dwarf2read.c (struct comp_unit_head): Remove dwarf2_abbrevs array.
index 05c0f23d03562ef505123fb5a8ddc08a37eea1bd..bf54a318d19e433d3cd933d708bac3d6a8707bd2 100644 (file)
@@ -2173,6 +2173,8 @@ arm_use_struct_convention (int gcc_p, struct type *type)
   int nRc;
   enum type_code code;
 
+  CHECK_TYPEDEF (type);
+
   /* In the ARM ABI, "integer" like aggregate types are returned in
      registers.  For an aggregate type to be integer like, its size
      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)
       for (i = 0; i < TYPE_NFIELDS (type); i++)
        {
          enum type_code field_type_code;
-         field_type_code = TYPE_CODE (TYPE_FIELD_TYPE (type, i));
+         field_type_code = TYPE_CODE (check_typedef (TYPE_FIELD_TYPE (type, i)));
 
          /* Is it a floating point type field?  */
          if (field_type_code == TYPE_CODE_FLT)
index 2dc3a46e07bfca9cd5337552cfaee0beb5031a7d..1349ffbbe19aceb8eaa4e616bb1805981d040cb7 100644 (file)
@@ -1343,6 +1343,12 @@ get_destructor_fn_field (struct type *t, int *method_indexp, int *field_indexp)
   return 0;
 }
 
+static void
+stub_noname_complaint (void)
+{
+  complaint (&symfile_complaints, "stub type has NULL name");
+}
+
 /* Added by Bryan Boreham, Kewill, Sun Sep 17 18:07:17 1989.
 
    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)
    This used to be coded as a macro, but I don't think it is called 
    often enough to merit such treatment.  */
 
-static void
-stub_noname_complaint (void)
-{
-  complaint (&symfile_complaints, "stub type has NULL name");
-}
+/* Find the real type of TYPE.  This function returns the real type, after
+   removing all layers of typedefs and completing opaque or stub types.
+   Completion changes the TYPE argument, but stripping of typedefs does
+   not.  */
 
 struct type *
 check_typedef (struct type *type)