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: [PING][PATCH 2/2] Involve gdbarch in taking DWARF register pieces


On Thu, Apr 28 2016, Andreas Arnez wrote:

> On Thu, Apr 28 2016, Pedro Alves wrote:
>
>> I'd naively think that the fix for something like that would be
>> to make dwarf_reg_to_regnum return the gdb FP register number instead 
>> of the vector number, when the type fits in a FP register, instead of
>> the need for an extra diversion step.  Ignoring the fact that we don't
>> currently pass the type/size to gdbarch_dwarf_reg_to_regnum.
>
> Right, ignoring that fact ;-)
>
> Also, IMHO the "actual" placement of an object within a register does
> not conceptually depend on where the register number came from.  It
> could come from DWARF, from some other debug format, from the user, or
> from wherever.  Adjusting the placement only for objects with a DWARF
> location seems wrong to me.

There's another aspect I should probably mention here.  The adjustment
of the register number in this gdbarch method is really just a
circumvention around the register cache's inability of representing
*partially* valid registers.  Otherwise unwinding would result in the
first 64 bits of such a vector register being "valid" and the others
"invalid", and then we could slice any value types from the valid bits.

In the long run maybe we want to extend the regcache in such a
direction, but I didn't see that in the scope of this fix.

--
Andreas


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