Re: [RFA][2/5] New port: Cell BE SPU (valops.c fix)

Ulrich Weigand
2006-11-22T19:55:18Z

Daniel Jacobowitz wrote:
> On Wed, Nov 22, 2006 at 11:25:48AM -0800, Jim Blandy wrote:
> > Or, possibly another gdbarch method, VALUE_TO_REGISTER_BITFIELD, which
> > can be left unset, provoking an internal error in value_assign?
>
> I'm not even quite sure how bitfields come into it. The register
> type's a builtin_type_vec128.

The problem occurs if there is a source-level variable of bitfield type
that currently resides in such a register, and the GDB user attempts to
assign to that variable.

I guess one problem here is that there's two different problems intermixed
here:

- if an integral type (possibly bitfield) resides in a vector register,
which parts of the vector register can I find it at (that's the platform
specific part)

- where within the bitfield is the particular element I want to access
(that's the generic part)

Maybe the best solution would be for GDB common code to call
VALUE_TO_REGISTER / REGISTER_TO_VALUE to solve the first problem,
but still solve the second problem in common code.

Otherwise every target would have to implement all the bitfield fiddling
separately -- I'm not sure this is required.

Bye,
Ulrich

--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com