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


On Mon, Apr 18, 2016 at 8:55 AM, Pedro Alves <palves@redhat.com> wrote:
> On 04/18/2016 04:02 PM, Andreas Arnez wrote:
>> On Mon, Apr 18 2016, Pedro Alves wrote:
>
>> OK.  Now, reading this again, it seems to me that I should better add
>> the following disclaimer at the end:
>>
>>   ... This method also applies when interpreting a register as a
>>   LEN-sized type, except when convert_register_p indicates that a
>>   special conversion is required instead.
>>
>> Still OK?

This is the part that I found lacking when I read the initial patch.

> Hmm, isn't "type" the other side of the same coin though?
>
> How about this:
>
> Determine the physical placement of a type of size LEN within register
> *REGNUM, possibly overwriting *REGNUM.  (E.g., some ABIs lay vector
> types in registers pairs, and thus this method writes the correct pair
> element to *REGNUM).  Returns the byte offset of the data within the
> (possibly adjusted) register.  This method is used when determining
> the placement of a DWARF piece (DW_OP_piece), or when interpreting a
> register as a LEN-sized type, except when convert_register_p indicates
> that a special conversion is required instead.

SGTM

>>> I'd suggest even calling it "dwarf_register_piece_placement" for
>>> caller clarity?
>>
>> Sure, but I find a name like 'gdbarch_dwarf_register_piece_placement' a
>> bit too unwieldy when trying to stick to an 80 char line size limit.
>> Maybe 'gdbarch_register_piece_placement'?
>
> Deal.  :-)
>
> Thanks,
> Pedro Alves
>


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