From patchwork Thu Dec 24 00:33:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kazu Hirata X-Patchwork-Id: 41776 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 05B29B7BEE for ; Fri, 25 Dec 2009 00:24:02 +1100 (EST) Received: from localhost ([127.0.0.1]:46146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNnfa-0000Is-Ir for incoming@patchwork.ozlabs.org; Thu, 24 Dec 2009 08:23:58 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NNbdz-0007ep-0j for qemu-devel@nongnu.org; Wed, 23 Dec 2009 19:33:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NNbdu-0007XP-QZ for qemu-devel@nongnu.org; Wed, 23 Dec 2009 19:33:30 -0500 Received: from [199.232.76.173] (port=59296 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNbdu-0007XI-D7 for qemu-devel@nongnu.org; Wed, 23 Dec 2009 19:33:26 -0500 Received: from gateway.codesourcery.com ([38.113.113.105]:54734 helo=daisy.codesourcery.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NNbdu-0001FO-6j for qemu-devel@nongnu.org; Wed, 23 Dec 2009 19:33:26 -0500 Received: by daisy.codesourcery.com (Postfix, from userid 1009) id A6E1F6F6226F; Wed, 23 Dec 2009 16:33:24 -0800 (PST) To: qemu-devel@nongnu.org Message-Id: <20091224003324.A6E1F6F6226F@daisy.codesourcery.com> Date: Wed, 23 Dec 2009 16:33:24 -0800 (PST) From: kazu@codesourcery.com (Kazu Hirata) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-Mailman-Approved-At: Thu, 24 Dec 2009 08:20:20 -0500 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) { I don't have a write access to the repository. Could someone apply this patch if it's OK? Thanks in advance, Kazu Hirata diff --git a/gdbstub.c b/gdbstub.c index 055093f..1a1640a 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 {