Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfa/arm] Fix some structs.exp failures
@ 2004-03-02 17:17 Daniel Jacobowitz
  2004-03-03 17:29 ` Richard Earnshaw
  2004-03-19  0:09 ` Daniel Jacobowitz
  0 siblings, 2 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2004-03-02 17:17 UTC (permalink / raw)
  To: gdb-patches; +Cc: rearnsha

structs.exp uses "typedef float tf".  A structure type that would otherwise
be returned by reference is returned by value, because GDB doesn't realize
that it counts as a floating-point-like structure.

OK?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2004-03-02  Daniel Jacobowitz  <drow@mvista.com>

	* arm-tdep.c (arm_use_struct_convention): Look through typedefs.

Index: gdb/arm-tdep.c
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gdb/arm-tdep.c,v
retrieving revision 1.164
diff -u -p -r1.164 arm-tdep.c
--- gdb/arm-tdep.c	16 Feb 2004 21:49:21 -0000	1.164
+++ gdb/arm-tdep.c	2 Mar 2004 17:11:25 -0000
@@ -2141,6 +2142,8 @@ arm_use_struct_convention (int gcc_p, st
   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
@@ -2198,7 +2201,7 @@ arm_use_struct_convention (int gcc_p, st
       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)


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-03-09 17:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-02 17:17 [rfa/arm] Fix some structs.exp failures Daniel Jacobowitz
2004-03-03 17:29 ` Richard Earnshaw
2004-03-03 21:35   ` Mark Kettenis
2004-03-04  9:58     ` Richard Earnshaw
2004-03-19  0:09       ` Richard Earnshaw
2004-03-19  0:09     ` Mark Kettenis
2004-03-09 17:11   ` Daniel Jacobowitz
2004-03-19  0:09     ` Daniel Jacobowitz
2004-03-19  0:09   ` Richard Earnshaw
2004-03-19  0:09 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox