From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOIwO-0003PK-4z for qemu-devel@nongnu.org; Tue, 16 Oct 2012 22:01:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOIwM-0001gb-S4 for qemu-devel@nongnu.org; Tue, 16 Oct 2012 22:01:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6574) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOIwM-0001fN-JI for qemu-devel@nongnu.org; Tue, 16 Oct 2012 22:00:58 -0400 Date: Tue, 16 Oct 2012 23:01:45 -0300 From: Luiz Capitulino Message-ID: <20121016230145.0e4d87f9@doriath.home> In-Reply-To: <1350430115-23724-1-git-send-email-aurelien@aurel32.net> References: <1350430115-23724-1-git-send-email-aurelien@aurel32.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] hmp: fix info cpus for sparc targets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: Blue Swirl , qemu-devel@nongnu.org, Markus Armbruster On Wed, 17 Oct 2012 01:28:34 +0200 Aurelien Jarno wrote: > 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); This patch changes qmp_query_cpus() to never set pc, so why do you print it? > monitor_printf(mon, "npc=0x%016" PRIx64, cpu->value->npc); > } > if (cpu->value->has_PC) {