Re: [RFA] New GDB target iq2000

Corinna Vinschen
2005-03-02T09:08:38Z

Hi Jim,

On Mar 1 17:11, Jim Blandy wrote:
> I think all the calls to set_gdbarch_<type>_bit can be left out,
> because they just re-state the default values. Same for
> decr_pc_after_break, no?

I'm ok with removing decr_pc_after_break, but I'd rather leave the
set_..._bit calls in, so that one can see on the first glance how
the datatypes are defined for this target. Actually I'd prefer to
have them defined in all targets explicitely. That way, a casual
reader of the code doesn't have to guess if the programmer left
them out accidentally or deliberately, especially in border cases
as long long or long double.

> +static enum return_value_convention
> +iq2000_return_value (struct gdbarch *gdbarch, struct type *type,
> [...]
>
> 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'm with Daniel here. readbuf and writebuf are mutually exclusive,
at least from a logical point of view. If the order of requesting
the value of readbuf and writebuf changes the behaviour of the
gdbarch_return_value function, than that's a design flaw of
gdbarch_return_value and should be fixed.

Corinna

--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat, Inc.