This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc][3/3] gdbserver bi-arch support: fix s390x partial register access
- From: Daniel Jacobowitz <drow at false dot org>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 29 Jan 2008 15:27:46 -0500
- Subject: Re: [rfc][3/3] gdbserver bi-arch support: fix s390x partial register access
- References: <200801211746.m0LHkQCl002914@d12av02.megacenter.de.ibm.com>
On Mon, Jan 21, 2008 at 06:46:26PM +0100, Ulrich Weigand wrote:
> The second problem is that when *setting* a partial register value, current
> code always pads the remainder of the register with zero. This is a problem
> with the PSW mask register on s390x, where one of the bits in the second
> half needs to be and remain set; otherwise the PSW is invalid and the
> inferior crashes.
>
> The patch fixes this by changing usr_store_inferior_registers by using a
> read-modify-write cycle when partially updating a register so that the
> bits in the part of the register that is not changed keep their old
> values.
What do you think about passing data to the low target in this case?
For MIPS the right bits will be value-dependent - registers must be
sign extended.
--
Daniel Jacobowitz
CodeSourcery