From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23322 invoked by alias); 4 Oct 2003 17:35:19 -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 23315 invoked from network); 4 Oct 2003 17:35:18 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 4 Oct 2003 17:35:18 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 035A62B89; Sat, 4 Oct 2003 13:35:17 -0400 (EDT) Message-ID: <3F7F04D4.3060506@redhat.com> Date: Sat, 04 Oct 2003 17:35:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Buettner Cc: Corinna Vinschen , gdb-patches@sources.redhat.com Subject: Re: [RFA] sh-tdep.c (sh_use_struct_convention): Restructure and fix References: <20031004113939.GK11435@cygbert.vinschen.de> <3F7EED21.1060902@redhat.com> <1031004170432.ZM27387@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-10/txt/msg00084.txt.bz2 > On Oct 4, 11:54am, Andrew Cagney wrote: > > >> See: http://sources.redhat.com/ml/gdb-patches/2003-10/msg00033.html. >> The ppc64_sysv_return_value code in ppc-sysv-tdep.c, has been written in >> a way that allows a quick update to this new iterface. > > > Andrew, > > There are pros and cons to the approach that you used in > ppc64_sysv_abi_return_value(). > > On the pro side - and this is definitely a good thing - you keep the > struct convention information together with the implementation of how > to return a value. It is stronger than that, it moves all of the ABIs struct convention logic to one place. At present key parts of the logic are scattered inconsistently across core parts of GDB The result is a longer but more correct function. > But this is also a con because you've spread the definition of > "use_struct_convention" out over a much larger number of lines. It > isn't (IMO) as easy to comprehend when arranged in this way. As my spec for the interface points out, if this were an OO language it would have a different interface. > The jury is still out (at least as far as I'm concerned) as to > which approach is better. I do happen to think that your approach > is better for ppc64 (and ppc too), but this may not necessarily be the > case for other architectures. This is a technical problem. The return_value patch fixes the problem of GDB not being able to handle all cases of: return return-value-in-register correctly. If Corinna instead implements use_struct_convention, then that bug won't be fixed. Andrew