This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa:ppc] Fix PPC/NBSD struct return; Was: userdef.exp regression for ppc?
- From: Jason R Thorpe <thorpej at wasabisystems dot com>
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Cc: Michael Elizabeth Chastain <mec at shout dot net>,gdb-patches at sources dot redhat dot com
- Date: Sat, 1 Jun 2002 15:03:19 -0700
- Subject: Re: [rfa:ppc] Fix PPC/NBSD struct return; Was: userdef.exp regression for ppc?
- Organization: Wasabi Systems, Inc.
- References: <200206011546.g51FkMj30586@duracef.shout.net> <3CF902B0.50405@cygnus.com>
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 <ac131313@redhat.com>
>
> * 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 <thorpej@wasabisystems.com>