This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PING][PATCH 2/2] Involve gdbarch in taking DWARF register pieces
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>, Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 28 Apr 2016 15:24:08 +0200
- Subject: [PING][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> <57150356 dot 3090508 at redhat dot com> <m3a8kpx0ls dot fsf at oc1027705133 dot ibm dot com>
Ping:
https://sourceware.org/ml/gdb-patches/2016-04/msg00437.html
IIRC, there was some uncertainty about the clarity/meaning of the new
gdbarch method's description below. Or has this cleared up by now?
On Tue, Apr 19 2016, Andreas Arnez wrote:
> Here's another attempt:
>
> Determine the physical placement of a piece of size LEN within register
> *REGNUM, possibly overwriting *REGNUM. (E.g., some ABIs have unwindable
> sub-registers embedded in non-unwindable full registers, and this method
> diverts from the full register to the sub-register if possible.)
> Returns the byte offset of the data within the (possibly adjusted)
> register. This method is used for determining the placement of a
> LEN-sized DWARF piece (DW_OP_piece) and when interpreting a register as
> a LEN-sized type (unless convert_register_p indicates that the type
> needs a special conversion).
[...]
> gdb/ChangeLog:
>
> * gdbarch.sh (value_from_register): Remove.
> (register_piece_placement): New.
> * gdbarch.c: Regenerate.
> * gdbarch.h: Likewise.
> * dwarf2loc.c (read_pieced_value): Get arch-specific placement of
> a register piece from gdbarch_register_piece_placement.
> (write_pieced_value): Likewise.
> * value.h (default_value_from_register): Remove.
> (default_register_piece_placement): Declare.
> * findvar.c (default_value_from_register): Remove.
> (default_register_piece_placement): New.
> (value_from_register): Call gdbarch_register_piece_placement
> instead of gdbarch_value_from_register.
> (address_from_register): Likewise.
> * s390-linux-tdep.c (s390_value_from_register): Remove.
> (s390_register_piece_placement): New.
> (s390_gdbarch_init): Set new gdbarch method
> register_piece_placement instead of value_from_register.
> * spu-tdep.c (spu_value_from_register): Remove.
> (spu_register_piece_placement): New.
> (spu_gdbarch_init): Set new gdbarch method
> register_piece_placement instead of value_from_register.