From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20281 invoked by alias); 1 Mar 2005 22:19:43 -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 20213 invoked from network); 1 Mar 2005 22:19:39 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 1 Mar 2005 22:19:39 -0000 Received: from drow by nevyn.them.org with local (Exim 4.44 #1 (Debian)) id 1D6FiJ-0006xZ-FW; Tue, 01 Mar 2005 17:19:35 -0500 Date: Tue, 01 Mar 2005 22:19:00 -0000 From: Daniel Jacobowitz To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] New GDB target iq2000 Message-ID: <20050301221935.GA26695@nevyn.them.org> Mail-Followup-To: Jim Blandy , gdb-patches@sources.redhat.com References: <20050222114141.GA18314@cygbert.vinschen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040907i X-SW-Source: 2005-03/txt/msg00007.txt.bz2 On Tue, Mar 01, 2005 at 05:11:31PM -0500, Jim Blandy wrote: > +static enum return_value_convention > +iq2000_return_value (struct gdbarch *gdbarch, struct type *type, > + struct regcache *regcache, > + void *readbuf, const void *writebuf) > +{ > + if (iq2000_use_struct_convention (type)) > + return RETURN_VALUE_STRUCT_CONVENTION; > + if (writebuf) > + iq2000_store_return_value (type, regcache, writebuf); > + else if (readbuf) > + iq2000_extract_return_value (type, regcache, readbuf); > + return RETURN_VALUE_REGISTER_CONVENTION; > +} > > The other return_value implementations I've seen allow one to pass > both a readbuf and a writebuf, and do the read before the write. I > can't find any place where it's actually used this way, but it seems > to be allowed by the interface. In any case, it's easy enough to make > iq2000_return_value behave like the others. I'd rather leave it this way, and find somewhere to document that you mustn't pass both. It doesn't make much sense to have them both... -- Daniel Jacobowitz CodeSourcery, LLC