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: drow at false dot org (Daniel Jacobowitz)
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 22 Nov 2006 20:55:02 +0100 (CET)
- Subject: Re: [RFA][2/5] New port: Cell BE SPU (valops.c fix)
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