OSDN Git Service

ppc: Fix size of ppc64 xer register
authorMichael Matz <matz@suse.de>
Fri, 23 Feb 2018 17:29:56 +0000 (17:29 +0000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 27 Apr 2018 08:05:22 +0000 (18:05 +1000)
commita2f04333a340282c0842e76c055297cb7ba56f0f
tree7fd654c43d4e4d06249c7fde54d542d0802824d2
parentc90c393c2dca764bf2a062b3769ac0de32f5fe28
ppc: Fix size of ppc64 xer register

The normal gdb definition of the XER registers is only 32 bit,
and that's what the current version of power64-core.xml also
says (seems copied from gdb's).  But qemu's idea of the XER register
is target_ulong (in CPUPPCState, ppc_gdb_register_len and
ppc_cpu_gdb_read_register)

That mismatch leads to the following message when attaching
with gdb:

  Truncated register 32 in remote 'g' packet

(and following on that qemu stops responding).  The simple fix is
to say the truth in the .xml file.  But the better fix is to
actually make it 32bit on the wire, as old gdbs don't support
XML files for describing registers.  Also the XER state in qemu
doesn't seem to use the high 32 bits, so sending it off to gdb
doesn't seem worthwhile.

Signed-off-by: Michael Matz <matz@suse.de>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/gdbstub.c