From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18525 invoked by alias); 1 Jun 2002 22:03:21 -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 18518 invoked from network); 1 Jun 2002 22:03:20 -0000 Received: from unknown (HELO dr-evil.shagadelic.org) (208.176.2.162) by sources.redhat.com with SMTP; 1 Jun 2002 22:03:20 -0000 Received: by dr-evil.shagadelic.org (Postfix, from userid 7518) id 81B149869; Sat, 1 Jun 2002 15:03:19 -0700 (PDT) Date: Sat, 01 Jun 2002 15:03:00 -0000 From: Jason R Thorpe To: Andrew Cagney Cc: Michael Elizabeth Chastain , gdb-patches@sources.redhat.com Subject: Re: [rfa:ppc] Fix PPC/NBSD struct return; Was: userdef.exp regression for ppc? Message-ID: <20020601150319.A27221@dr-evil.shagadelic.org> Mail-Followup-To: Jason R Thorpe , Andrew Cagney , Michael Elizabeth Chastain , gdb-patches@sources.redhat.com References: <200206011546.g51FkMj30586@duracef.shout.net> <3CF902B0.50405@cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3CF902B0.50405@cygnus.com>; from ac131313@cygnus.com on Sat, Jun 01, 2002 at 01:21:52PM -0400 Organization: Wasabi Systems, Inc. X-SW-Source: 2002-06/txt/msg00010.txt.bz2 On Sat, Jun 01, 2002 at 01:21:52PM -0400, Andrew Cagney wrote: > Yep! The attached fixes it. Looks like PPC/NetBSD's custom GCC has a > fixed struct return (I'm pretty sure that mainline GCC is broken). Hm. At a quick glance, I didn't see any changes wrt. struct return in NetBSD's 2.91 or 2.95 vintage compilers. I'll look into this further on Monday. > > The old code, for reasons I'm not sure, was failing to detect NetBSD and > hence was failing ot set it. > > Andrew > > 2002-06-01 Andrew Cagney > > * ppcnbsd-tdep.c (ppcnbsd_init_abi): Don't set > use_struct_convention to sysv_abi_broken_use_struct_convention. > > Index: ppcnbsd-tdep.c > =================================================================== > RCS file: /cvs/src/src/gdb/ppcnbsd-tdep.c,v > retrieving revision 1.1 > diff -p -r1.1 ppcnbsd-tdep.c > *** ppcnbsd-tdep.c 28 May 2002 18:43:07 -0000 1.1 > --- ppcnbsd-tdep.c 1 Jun 2002 17:07:37 -0000 > *************** ppcnbsd_init_abi (struct gdbarch_info in > *** 203,211 **** > /* Until November 2001, gcc was not complying to the SYSV ABI for > returning structures less than or equal to 8 bytes in size. It was > returning everything in memory. When this was corrected, it wasn't > ! fixed for native platforms. */ > set_gdbarch_use_struct_convention (gdbarch, > ppc_sysv_abi_broken_use_struct_convention); > > set_solib_svr4_fetch_link_map_offsets (gdbarch, > nbsd_ilp32_solib_svr4_fetch_link_map_offsets); > --- 203,217 ---- > /* Until November 2001, gcc was not complying to the SYSV ABI for > returning structures less than or equal to 8 bytes in size. It was > returning everything in memory. When this was corrected, it wasn't > ! fixed for native platforms. > ! > ! However, NetBSD 1.5.x uses gcc version egcs-2.91.66 19990314 > ! (egcs-1.1.2 release) with local patches and that has a fixed > ! struct convention. */ > ! #if 0 > set_gdbarch_use_struct_convention (gdbarch, > ppc_sysv_abi_broken_use_struct_convention); > + #endif > > set_solib_svr4_fetch_link_map_offsets (gdbarch, > nbsd_ilp32_solib_svr4_fetch_link_map_offsets); -- -- Jason R. Thorpe