From patchwork Tue Oct 16 23:28:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 191913 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7D7072C0087 for ; Wed, 17 Oct 2012 10:28:57 +1100 (EST) Received: from localhost ([::1]:55677 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOGZD-0006fM-DM for incoming@patchwork.ozlabs.org; Tue, 16 Oct 2012 19:28:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOGZ2-0006bZ-76 for qemu-devel@nongnu.org; Tue, 16 Oct 2012 19:28:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOGZ0-0006Iz-Kn for qemu-devel@nongnu.org; Tue, 16 Oct 2012 19:28:44 -0400 Received: from hall.aurel32.net ([88.191.126.93]:52909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOGZ0-0006IM-Fe for qemu-devel@nongnu.org; Tue, 16 Oct 2012 19:28:42 -0400 Received: from [2001:470:d4ed:1:2db:dfff:fe14:52d] (helo=ohm.aurel32.net) by hall.aurel32.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1TOGYz-0004Je-6r; Wed, 17 Oct 2012 01:28:41 +0200 Received: from aurel32 by ohm.aurel32.net with local (Exim 4.80) (envelope-from ) id 1TOGYx-0006BH-3x; Wed, 17 Oct 2012 01:28:39 +0200 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Wed, 17 Oct 2012 01:28:34 +0200 Message-Id: <1350430115-23724-1-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 88.191.126.93 Cc: Blue Swirl , Markus Armbruster , Aurelien Jarno , Luiz Capitulino Subject: [Qemu-devel] [PATCH 1/2] hmp: fix info cpus for sparc targets X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On sparc targets, info cpus returns this kind of output: | info cpus | * CPU #0: pc=0x0000000000424d18pc=0x0000000000424d18npc=0x0000000000424d1c thread_id=19460 pc is printed twice, there is no space between pc, pc and npc. As npc implies pc, don't set has_pc on sparc, and add a space between pc and npc. Cc: Luiz Capitulino Cc: Markus Armbruster Cc: Blue Swirl Signed-off-by: Aurelien Jarno --- cpus.c | 2 -- hmp.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cpus.c b/cpus.c index 750a76f..cbc8556 100644 --- a/cpus.c +++ b/cpus.c @@ -1216,8 +1216,6 @@ CpuInfoList *qmp_query_cpus(Error **errp) info->value->has_nip = true; info->value->nip = env->nip; #elif defined(TARGET_SPARC) - info->value->has_pc = true; - info->value->pc = env->pc; info->value->has_npc = true; info->value->npc = env->npc; #elif defined(TARGET_MIPS) diff --git a/hmp.c b/hmp.c index 70bdec2..64b6ab5 100644 --- a/hmp.c +++ b/hmp.c @@ -242,7 +242,7 @@ void hmp_info_cpus(Monitor *mon) monitor_printf(mon, "nip=0x%016" PRIx64, cpu->value->nip); } if (cpu->value->has_npc) { - monitor_printf(mon, "pc=0x%016" PRIx64, cpu->value->pc); + monitor_printf(mon, "pc=0x%016 " PRIx64, cpu->value->pc); monitor_printf(mon, "npc=0x%016" PRIx64, cpu->value->npc); } if (cpu->value->has_PC) {