From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30054 invoked by alias); 2 Mar 2004 17:17:01 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 30036 invoked from network); 2 Mar 2004 17:17:00 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 2 Mar 2004 17:17:00 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1AyDVr-0006Ge-D6; Tue, 02 Mar 2004 12:16:59 -0500 Date: Fri, 19 Mar 2004 00:09:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Cc: rearnsha@arm.com Subject: [rfa/arm] Fix some structs.exp failures Message-ID: <20040302171658.GA24060@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com, rearnsha@arm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2004-03/txt/msg00029.txt.bz2 Message-ID: <20040319000900.4-4MFBXp78UQWqOKZqA9YjsmJnoWDpXEwkeL2Bs0nJ4@z> 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 * 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)