From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzSFA-0006hZ-IW for qemu-devel@nongnu.org; Fri, 12 Dec 2014 10:35:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XzSF2-00045m-Ih for qemu-devel@nongnu.org; Fri, 12 Dec 2014 10:35:00 -0500 Received: from mail.uni-paderborn.de ([131.234.142.9]:52972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XzSF2-00044s-BS for qemu-devel@nongnu.org; Fri, 12 Dec 2014 10:34:52 -0500 Message-ID: <548B193A.9050802@mail.uni-paderborn.de> Date: Fri, 12 Dec 2014 16:35:06 +0000 From: Bastian Koppelmann MIME-Version: 1.0 References: <1418393430-12336-1-git-send-email-alexander.zuepke@hs-rm.de> <8aaedb4e-b5b2-437e-9bc0-59073148e1fc@EXCHANGE-4K.hds.local> In-Reply-To: <8aaedb4e-b5b2-437e-9bc0-59073148e1fc@EXCHANGE-4K.hds.local> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/4] target-tricore: pretty-print register dump and show more status registers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Zuepke , qemu-devel@nongnu.org On 12/12/2014 02:10 PM, Alex Zuepke wrote: > Signed-off-by: Alex Zuepke > --- > target-tricore/translate.c | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > > diff --git a/target-tricore/translate.c b/target-tricore/translate.c > index e3eeedb..d1b845b 100644 > --- a/target-tricore/translate.c > +++ b/target-tricore/translate.c > @@ -87,19 +87,25 @@ void tricore_cpu_dump_state(CPUState *cs, FILE *f, > CPUTriCoreState *env = &cpu->env; > int i; > > - cpu_fprintf(f, "PC=%08x\n", env->PC); > + cpu_fprintf(f, "PC: " TARGET_FMT_lx, env->PC); > + cpu_fprintf(f, " PCXI: " TARGET_FMT_lx, env->PCXI); > + cpu_fprintf(f, " FCX: " TARGET_FMT_lx, env->FCX); > + cpu_fprintf(f, " LCX: " TARGET_FMT_lx, env->LCX); > + cpu_fprintf(f, " PSW: " TARGET_FMT_lx, env->PSW); I'm afraid that won't work, since the user status bits of the PSW are cached for faster access. Consider using psw_read(). > + > for (i = 0; i < 16; ++i) { > if ((i & 3) == 0) { > - cpu_fprintf(f, "GPR A%02d:", i); > + cpu_fprintf(f, "\nGPR A%02d:", i); > } > - cpu_fprintf(f, " %s " TARGET_FMT_lx, regnames_a[i], env->gpr_a[i]); > + cpu_fprintf(f, " " TARGET_FMT_lx, env->gpr_a[i]); > } > for (i = 0; i < 16; ++i) { > if ((i & 3) == 0) { > - cpu_fprintf(f, "GPR D%02d:", i); > + cpu_fprintf(f, "\nGPR D%02d:", i); > } > - cpu_fprintf(f, " %s " TARGET_FMT_lx, regnames_d[i], env->gpr_d[i]); > + cpu_fprintf(f, " " TARGET_FMT_lx, env->gpr_d[i]); > } > + cpu_fprintf(f, "\n"); > > } > Cheers, Bastian