This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA][2/5] New port: Cell BE SPU (valops.c fix)
- From: Jim Blandy <jimb at codesourcery dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: drow at false dot org (Daniel Jacobowitz), gdb-patches at sourceware dot org
- Date: Mon, 27 Nov 2006 11:31:39 -0800
- Subject: Re: [RFA][2/5] New port: Cell BE SPU (valops.c fix)
- References: <200611231755.kANHt6g2013138@d12av02.megacenter.de.ibm.com>
"Ulrich Weigand" <uweigand@de.ibm.com> writes:
> We might be able to fix this particular problem by having
> value_from_register somehow set the value_offset to 3 when
> retrieving a value of type "char" from a register. However,
> even though there is a comment saying "The assumption is that
> REGISTER_TO_VALUE populates the entire value including the
> location.", that isn't actually possible with the current
> interface since REGISTER_TO_VALUE doesn't actually *get*
> the value itself.
It seems to me this is the problem to fix. When value_from_register
retrieves a char from an SPU register, and that char is occupying byte
three of the register, then if that value doesn't have its
value_offset set, that seems wrong. You're using CONVERTIBLE_P and
VALUE_TO_REGISTER / REGISTER_TO_VALUE to make up for that loss of
information; why not actually provide it?
I'd prefer that to adding a new field to struct value.