From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6742 invoked by alias); 1 May 2010 09:02:01 -0000 Received: (qmail 6647 invoked by uid 22791); 1 May 2010 09:02:00 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 01 May 2010 09:01:56 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id o4191Soo019728; Sat, 1 May 2010 11:01:28 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id o4191RM8014188; Sat, 1 May 2010 11:01:27 +0200 (CEST) Date: Sat, 01 May 2010 09:02:00 -0000 Message-Id: <201005010901.o4191RM8014188@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: brobecker@adacore.com CC: gdb-patches@sourceware.org In-reply-to: <1272666620-10914-1-git-send-email-brobecker@adacore.com> (message from Joel Brobecker on Fri, 30 Apr 2010 15:30:20 -0700) Subject: Re: [RFA/sparc] "finish" does not work if function returns array. References: <1272666620-10914-1-git-send-email-brobecker@adacore.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-05/txt/msg00003.txt.bz2 > From: Joel Brobecker > Date: Fri, 30 Apr 2010 15:30:20 -0700 > > This is something that is not explicitly covered by the ABI, which > would explain why it's not covered by the code yet. In Ada, functions > can return arrays, for instance: > > type Data_Small is array (1 .. 2) of Integer; > function Create_Small return Data_Small; Yeah, it's a serious problem that ABIs only tend to cover the C language. > gdb/sparc-tdep.c | 7 ++++++- > gdb/sparc64-tdep.c | 7 ++++++- > 2 files changed, 12 insertions(+), 2 deletions(-) > > diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c > index a2bae9f..f882505 100644 > --- a/gdb/sparc-tdep.c > +++ b/gdb/sparc-tdep.c > @@ -221,7 +221,11 @@ sparc_floating_p (const struct type *type) > return 0; > } > > -/* Check whether TYPE is "Structure or Union". */ > +/* Check whether TYPE is "Structure or Union". > + > + In terms of subprogram calls, arrays are treated the same as struct > + and union types. So this function also returns non-zero for array > + types. */ Could you turn that into "In terms of Ada subprogram calls..."?