From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14358 invoked by alias); 22 Mar 2002 20:37:59 -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 14323 invoked from network); 22 Mar 2002 20:37:53 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 22 Mar 2002 20:37:53 -0000 Received: from cse.cygnus.com (cse.cygnus.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id MAA02674; Fri, 22 Mar 2002 12:37:49 -0800 (PST) Received: (from kev@localhost) by cse.cygnus.com (8.11.6/8.11.6) id g2MKbSH27747; Fri, 22 Mar 2002 13:37:28 -0700 Date: Fri, 22 Mar 2002 12:37:00 -0000 From: Kevin Buettner Message-Id: <1020322203728.ZM27746@localhost.localdomain> In-Reply-To: Elena Zannoni "Re: [RFA] PPC ABI compliance fix" (Mar 22, 3:06pm) References: <15515.34258.778318.466752@localhost.redhat.com> <3C9B8B66.2090403@cygnus.com> <15515.36530.35292.601677@localhost.redhat.com> X-Mailer: Z-Mail (4.0.1 13Jan97 Caldera) To: Elena Zannoni , Andrew Cagney Subject: Re: [RFA] PPC ABI compliance fix Cc: gdb-patches@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-03/txt/msg00434.txt.bz2 On Mar 22, 3:06pm, Elena Zannoni wrote: > > > +ppc_sysv_abi_use_struct_convention (int gcc_p, struct type *value_type) > > > +{ > > > + return (TYPE_LENGTH (value_type) > 8); > > > +} > > > + > > > /* round2 rounds x up to the nearest multiple of s assuming that s is a > > > power of 2 */ > > > > Should this live in rs6000-tdep.c? > > Yes, There is a FIXME about that in the file. I am not sure why > sysv_push_arguments is in that file as well. I didn't want to change > it in case there was some real technical problem. > > Maybe Kevin knows why? There's no real technical problem. I wrote ppc_sysv_abi_push_arguments() for Linux, so it ended up in the Linux file. I don't think there would be any real problem with moving it to rs6000-tdep.c, but I would prefer not to since rs6000-tdep.c deals more with the PowerOpen ABI (in addition to generic arch considerations). In my opinion, they probably belong in a ppc-sysv-abi-tdep.c file. But at the moment, there's no real incentive for creating this file (aside from making things somewhat more tidy) because ppc-linux-tdep.c needs to be a part of all GDB builds that target Power / PowerPC. I've been thinking about Andrew's comments from a week or so ago in the discussion regarding x86-64-linux-tdep.c. As Andrew noted at the time, the gdbarch machinery that we now have isn't set up to do inheritance, and so as a consequence, we end up with the situation that we have with the ppc*-tdep.c files in which you need include linux support in a native build for AIX. It would be nice if we could restructure things so that there'd be a generic ppc-tdep.c file which knows nothing about ABIs or OS considerations. Under that, you'd have ppc-poweropen-abi.c (or whatever IBM is calling their ABI these days) and ppc-sysv-abi-tdep.c and perhaps even ppc-sysv-eabi-tdep.c. Below that you'd have the various OS specific tdep files. Unfortunately, we can't do it yet because the gdbarch machinery won't allow it. Kevin