From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVV26-0008To-UU for qemu-devel@nongnu.org; Thu, 14 Jan 2010 14:07:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVV25-0008S1-Km for qemu-devel@nongnu.org; Thu, 14 Jan 2010 14:07:01 -0500 Received: from [199.232.76.173] (port=47106 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVV25-0008Rf-Ce for qemu-devel@nongnu.org; Thu, 14 Jan 2010 14:07:01 -0500 Received: from hall.aurel32.net ([88.191.82.174]:56332) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NVV24-000448-NE for qemu-devel@nongnu.org; Thu, 14 Jan 2010 14:07:01 -0500 Date: Thu, 14 Jan 2010 20:06:57 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] Fix a typo in 'P' packet processing for M68K. Message-ID: <20100114190657.GJ16630@volta.aurel32.net> References: <20100114170800.95B595664C4@henry1.codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20100114170800.95B595664C4@henry1.codesourcery.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kazu Hirata Cc: qemu-devel@nongnu.org On Thu, Jan 14, 2010 at 09:08:00AM -0800, Kazu Hirata wrote: > Hi, > > Attached is a patch to fix a typo in 'P' packet processing for M68K. > > Without this patch, QEMU fails to honor GDB's P packets from GDB > (writing to registers) for the address registers (A0 - A7). > > The problem is because of an obvious typo. Notice that the second > "if" condition is meant to be n < 16 in: > > if (n < 8) { > : > } else if (n < 8) { > > Signed-off-by: Kazu Hirata Thanks, applied. > --- > gdbstub.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/gdbstub.c b/gdbstub.c > index 6180171..80477be 100644 > --- a/gdbstub.c > +++ b/gdbstub.c > @@ -1014,7 +1014,7 @@ static int cpu_gdb_write_register(CPUState *env, uint8_t *mem_buf, int n) > if (n < 8) { > /* D0-D7 */ > env->dregs[n] = tmp; > - } else if (n < 8) { > + } else if (n < 16) { > /* A0-A7 */ > env->aregs[n - 8] = tmp; > } else { > -- > 1.6.2.4 > > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net