From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXGBR-0001Je-6X for qemu-devel@nongnu.org; Mon, 07 Apr 2014 16:30:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXGBJ-0006pC-Bf for qemu-devel@nongnu.org; Mon, 07 Apr 2014 16:30:21 -0400 Message-ID: <53430AD2.7010203@suse.de> Date: Mon, 07 Apr 2014 22:30:10 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1396900939-21495-1-git-send-email-tlfalcon@linux.vnet.ibm.com> <1396900939-21495-3-git-send-email-tlfalcon@linux.vnet.ibm.com> In-Reply-To: <1396900939-21495-3-git-send-email-tlfalcon@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v9 2/2] target-ppc: gdbstub allow byte swapping for reading/writing registers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Falcon , qemu-devel@nongnu.org Cc: tommusta@gmail.com, qemu-ppc@nongnu.org, agraf@suse.de Am 07.04.2014 22:02, schrieb Thomas Falcon: > This patch allows registers to be properly read from and written to > when using the gdbstub to debug a ppc guest running in little > endian mode. >=20 > Signed-off-by: Thomas Falcon > --- > Differences from v8: >=20 > Separated into multiple patches > ppc_gdb_swap_register(...) is now a static function > Removed "cpu" from the function named > Cleaned up the comments > --- > target-ppc/gdbstub.c | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) >=20 > diff --git a/target-ppc/gdbstub.c b/target-ppc/gdbstub.c > index 0740af8..e774db1 100644 > --- a/target-ppc/gdbstub.c > +++ b/target-ppc/gdbstub.c > @@ -59,6 +59,17 @@ static int ppc_gdb_register_len(int n) > } > =20 > =20 > +static void ppc_gdb_swap_register(uint8_t *mem_buf, int n, int len) > +{ > + if (len =3D=3D 4) { > + bswap32s((uint32_t *)mem_buf); > + } else if (len =3D=3D 8){ Space missing here, but otherwise Reviewed-by: Andreas F=E4rber Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg