Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: arnez@linux.vnet.ibm.com (Andreas Arnez)
Cc: gdb-patches@sourceware.org, Ulrich.Weigand@de.ibm.com (Ulrich Weigand)
Subject: Re: [PATCH 2/2] Involve gdbarch in taking DWARF register pieces
Date: Fri, 15 Apr 2016 18:10:00 -0000	[thread overview]
Message-ID: <20160415180943.4FEE857EE@oc7340732750.ibm.com> (raw)
In-Reply-To: <1460716939-27850-3-git-send-email-arnez@linux.vnet.ibm.com> from "Andreas Arnez" at Apr 15, 2016 12:41:39 PM

Andreas Arnez wrote:

> On s390, when a 'long double' variable is located in a pair of FP
> registers, its DWARF location looks something like this:
> 
>      DW_OP_reg24 (f8); DW_OP_piece: 8; DW_OP_reg25 (f10); DW_OP_piece: 8
> 
> If the target has a vector facility, each of its FP registers is
> embedded left-aligned in a vector register with the same identical DWARF
> register number.  But GDB always takes a register piece from the "least
> significant" end, which is exactly opposite from where the FP register
> is embedded.  This mismatch causes a regression with store.exp.
> 
> This change fixes this issue by taking s390 vector register pieces from
> the left end instead.  Since this requires a suitable gdbarch interface,
> the gdbarch method 'value_from_register' is replaced by a new method
> 'register_part' with similar functionality, but a slightly different
> interface.  This method is then invoked in read_pieced_value and
> write_pieced_value.

I agree it makes sense to use the same gdbarch-provided information
in both places here.

> gdb/ChangeLog:
> 
> 	* gdbarch.sh (value_from_register): Remove.
> 	(register_part): New.
> 	* gdbarch.c: Regenerate.
> 	* gdbarch.h: Likewise.
> 	* dwarf2loc.c (read_pieced_value): Get arch-specific placement of
> 	a register piece from the new gdbarch method register_part.
> 	(write_pieced_value): Likewise.
> 	* value.h (default_value_from_register): Remove.
> 	(default_register_part): Declare.
> 	* findvar.c (default_value_from_register): Remove.
> 	(default_register_part): New.
> 	(value_from_register): Call gdbarch_register_part instead of
> 	gdbarch_value_from_register.
> 	(address_from_register): Likewise.
> 	* s390-linux-tdep.c (s390_value_from_register): Remove.
> 	(s390_register_part): New.
> 	(s390_gdbarch_init): Set new gdbarch method register_part instead
> 	of value_from_register.
> 	* spu-tdep.c (spu_value_from_register): Remove.
> 	(spu_register_part): New.
> 	(spu_gdbarch_init): Set new gdbarch method register_part instead
> 	of value_from_register.

This is OK.

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2016-04-15 18:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15 10:42 [PATCH 0/2] Fixes for some s390 fails with store.exp Andreas Arnez
2016-04-15 10:43 ` [PATCH 1/2] S390: Take value from sub-register if applicable Andreas Arnez
2016-04-15 18:08   ` Ulrich Weigand
2016-04-15 10:43 ` [PATCH 2/2] Involve gdbarch in taking DWARF register pieces Andreas Arnez
2016-04-15 18:10   ` Ulrich Weigand [this message]
2016-04-15 18:37     ` Pedro Alves
2016-04-18 11:53       ` Andreas Arnez
2016-04-18 13:53         ` Pedro Alves
2016-04-18 15:02           ` Andreas Arnez
2016-04-18 15:55             ` Pedro Alves
2016-04-18 15:57               ` Doug Evans
2016-04-19 12:08               ` Andreas Arnez
2016-04-28 13:24                 ` [PING][PATCH " Andreas Arnez
2016-04-28 14:47                   ` Pedro Alves
2016-04-28 16:51                     ` Andreas Arnez
2016-04-28 18:16                       ` Andreas Arnez
2016-04-28 22:15                         ` Pedro Alves
2016-04-28 22:15                       ` Pedro Alves
2016-06-14 17:03                   ` Jan Kratochvil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160415180943.4FEE857EE@oc7340732750.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=arnez@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox