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)


On Tue, Nov 28, 2006 at 12:23:34AM +0100, Ulrich Weigand wrote:
> However, I still think there's something fundamentally broken in the
> way value_assign calls VALUE_TO_REGISTER.   As the documentation says,
> that gdbarch functions is supposed to "convert a data value of type
> TYPE to register number REG's raw format".  Calling the conversion
> function with a type that does not actually denote the type of the
> register contents, but some subfield, must break all other implementations
> of that routine as well ...

Except that I suspect there are no other implementations of
VALUE_TO_REGISTER which offer any subfields.  It was usually used for
things like registers which can only hold a float by converting it to
double, and those floating point registers generally can't hold
arbitrary structs or arrays.

There might be some trouble on i386 though... I think you'd need
extraordinary bad luck to trigger it.  A field of a struct spread
across multiple registers.

These three hooks are simply not very clearly defined.

-- 
Daniel Jacobowitz
CodeSourcery


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