From patchwork Thu Jan 14 17:08:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kazu Hirata X-Patchwork-Id: 42920 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 13693B7C8D for ; Fri, 15 Jan 2010 04:42:17 +1100 (EST) Received: from localhost ([127.0.0.1]:54023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVTg6-0000mO-W0 for incoming@patchwork.ozlabs.org; Thu, 14 Jan 2010 12:40:15 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVTB2-0006Od-OA for qemu-devel@nongnu.org; Thu, 14 Jan 2010 12:08:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVTAx-0006MN-FC for qemu-devel@nongnu.org; Thu, 14 Jan 2010 12:08:07 -0500 Received: from [199.232.76.173] (port=57904 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVTAw-0006MC-Ru for qemu-devel@nongnu.org; Thu, 14 Jan 2010 12:08:03 -0500 Received: from mx20.gnu.org ([199.232.41.8]:24587) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NVTAw-0008Ce-7v for qemu-devel@nongnu.org; Thu, 14 Jan 2010 12:08:02 -0500 Received: from gateway.codesourcery.com ([38.113.113.105] helo=henry1.codesourcery.com) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NVTAv-0008LQ-Fh for qemu-devel@nongnu.org; Thu, 14 Jan 2010 12:08:01 -0500 Received: by henry1.codesourcery.com (Postfix, from userid 1009) id 95B595664C4; Thu, 14 Jan 2010 09:08:00 -0800 (PST) To: qemu-devel@nongnu.org Message-Id: <20100114170800.95B595664C4@henry1.codesourcery.com> Date: Thu, 14 Jan 2010 09:08:00 -0800 (PST) From: kazu@codesourcery.com (Kazu Hirata) X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: aurelien@aurel32.net Subject: [Qemu-devel] [PATCH] Fix a typo in 'P' packet processing for M68K. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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 {