From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12930 invoked by alias); 9 Oct 2005 19:13: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 12915 invoked by uid 22791); 9 Oct 2005 19:12:59 -0000 Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 09 Oct 2005 19:12:59 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id j99JCsXt013149; Sun, 9 Oct 2005 21:12:54 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id j99JCsxx024864; Sun, 9 Oct 2005 21:12:54 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id j99JCrxB007502; Sun, 9 Oct 2005 21:12:53 +0200 (CEST) Date: Sun, 09 Oct 2005 19:13:00 -0000 Message-Id: <200510091912.j99JCrxB007502@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: gdb-patches@sources.redhat.com In-reply-to: <20051008075513.GC22319@adacore.com> (message from Joel Brobecker on Sat, 8 Oct 2005 00:55:13 -0700) Subject: Re: [RFA/i386] Functions returning TYPE_CODE_ARRAY types ... References: <20051008075513.GC22319@adacore.com> X-SW-Source: 2005-10/txt/msg00075.txt.bz2 > Date: Sat, 8 Oct 2005 00:55:13 -0700 > From: Joel Brobecker > > Hello, > > One of our users just came across this on an i386-linux machine. > He tried to do a "finish" on a function that returns an array whose > size is statically known. This is not possible in C, but this can be > done in Ada. Consider the following code: Dunno any Ada, but... > > The problem is that the the i386 struct-return code did not expect > a function whose return type is a TYPE_CODE_ARRAY. This case is not > mentioned as far as I could tell in the ABI, but the array is returned > the same way records would be. > > The attached patch implements this. > > 2005-10-07 Joel Brobecker > > * i386-tdep.c (i386_reg_struct_return_p): Allow array types as well. > (i386_return_value): Add handling for functions that return array > types. ...this makes sense to me. Please go ahead. Mark