From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L6p8i-0007l6-Ld for qemu-devel@nongnu.org; Sun, 30 Nov 2008 11:27:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L6p8i-0007kg-30 for qemu-devel@nongnu.org; Sun, 30 Nov 2008 11:27:20 -0500 Received: from [199.232.76.173] (port=44973 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L6p8h-0007kd-Nz for qemu-devel@nongnu.org; Sun, 30 Nov 2008 11:27:19 -0500 Received: from hall.aurel32.net ([88.191.82.174]:55011) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L6p8h-0007se-6G for qemu-devel@nongnu.org; Sun, 30 Nov 2008 11:27:19 -0500 Received: from aurel32 by hall.aurel32.net with local (Exim 4.63) (envelope-from ) id 1L6p8g-0003bx-0y for qemu-devel@nongnu.org; Sun, 30 Nov 2008 17:27:18 +0100 Date: Sun, 30 Nov 2008 17:27:18 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] gdbstub: Fix access to PPC FPRs Message-ID: <20081130162718.GF11797@hall.aurel32.net> References: <492FC181.70000@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <492FC181.70000@siemens.com> Sender: Aurelien Jarno Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Fri, Nov 28, 2008 at 11:01:37AM +0100, Jan Kiszka wrote: > Obviously, someone forgot to rebase the index before accessing one of > the 32 FPRs. > > Signed-off-by: Jan Kiszka Thanks, applied. > > gdbstub.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gdbstub.c b/gdbstub.c > index b522a89..452b7d0 100644 > --- a/gdbstub.c > +++ b/gdbstub.c > @@ -428,7 +428,7 @@ static int cpu_gdb_read_register(CPUState *env, uint8_t *mem_buf, int n) > GET_REGL(env->gpr[n]); > } else if (n < 64) { > /* fprs */ > - stfq_p(mem_buf, env->fpr[n]); > + stfq_p(mem_buf, env->fpr[n-32]); > return 8; > } else { > switch (n) { > @@ -459,7 +459,7 @@ static int cpu_gdb_write_register(CPUState *env, uint8_t *mem_buf, int n) > return sizeof(target_ulong); > } else if (n < 64) { > /* fprs */ > - env->fpr[n] = ldfq_p(mem_buf); > + env->fpr[n-32] = ldfq_p(mem_buf); > return 8; > } else { > switch (n) { > > > -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net