This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] Involve gdbarch in taking DWARF register pieces
- From: Pedro Alves <palves at redhat dot com>
- To: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>, gdb-patches at sourceware dot org, Ulrich Weigand <Ulrich dot Weigand at de dot ibm dot com>
- Date: Mon, 18 Apr 2016 16:55:02 +0100
- Subject: Re: [PATCH 2/2] Involve gdbarch in taking DWARF register pieces
- Authentication-results: sourceware.org; auth=none
- References: <20160415180943 dot 4FEE857EE at oc7340732750 dot ibm dot com> <571134CD dot 8080507 at redhat dot com> <m3shyjw2t3 dot fsf at oc1027705133 dot ibm dot com> <5714E6EA dot 8050905 at redhat dot com> <m3lh4bvu2z dot fsf at oc1027705133 dot ibm dot com>
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?
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.
>> 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