This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] New GDB target iq2000
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jim Blandy <jimb at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 1 Mar 2005 17:19:35 -0500
- Subject: Re: [RFA] New GDB target iq2000
- References: <20050222114141.GA18314@cygbert.vinschen.de> <vt2ekez584s.fsf@zenia.home>
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