This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]