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: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: jimb at codesourcery dot com (Jim Blandy)
- Cc: drow at false dot org (Daniel Jacobowitz), gdb-patches at sourceware dot org
- Date: Mon, 27 Nov 2006 23:06:24 +0100 (CET)
- Subject: Re: [RFA][2/5] New port: Cell BE SPU (valops.c fix)
Jim Blandy wrote:
> 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?
So just to make sure I understood correctly, you'd suggesting that
I should *not* be using CONVERT_REGISTER_P for those registers?
Instead, value_from_register should run into its default path,
and at the place where it computes the offset
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
&& len < register_size (current_gdbarch, regnum))
/* Big-endian, and we want less than full size. */
set_value_offset (v, register_size (current_gdbarch, regnum) - len);
else
set_value_offset (v, 0);
we add some architecture-specific way to set a different offset?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com