From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
To: Alex Zuepke <alexander.zuepke@hs-rm.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4/4] target-tricore: pretty-print register dump and show more status registers
Date: Fri, 12 Dec 2014 16:35:06 +0000 [thread overview]
Message-ID: <548B193A.9050802@mail.uni-paderborn.de> (raw)
In-Reply-To: <8aaedb4e-b5b2-437e-9bc0-59073148e1fc@EXCHANGE-4K.hds.local>
On 12/12/2014 02:10 PM, Alex Zuepke wrote:
> Signed-off-by: Alex Zuepke <alexander.zuepke@hs-rm.de>
> ---
> 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
prev parent reply other threads:[~2014-12-12 15:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1418393430-12336-1-git-send-email-alexander.zuepke@hs-rm.de>
2014-12-12 14:10 ` [Qemu-devel] [PATCH 1/4] target-tricore: fix offset masking in BOL format Alex Zuepke
2014-12-12 16:26 ` Bastian Koppelmann
2014-12-12 14:10 ` [Qemu-devel] [PATCH 2/4] target-tricore: typo " Alex Zuepke
2014-12-12 16:26 ` Bastian Koppelmann
2014-12-12 14:10 ` [Qemu-devel] [PATCH 3/4] target-tricore: add missing 64-bit MOV in RLC format Alex Zuepke
2014-12-12 16:30 ` Bastian Koppelmann
2014-12-12 14:10 ` [Qemu-devel] [PATCH 4/4] target-tricore: pretty-print register dump and show more status registers Alex Zuepke
2014-12-12 16:35 ` Bastian Koppelmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=548B193A.9050802@mail.uni-paderborn.de \
--to=kbastian@mail.uni-paderborn.de \
--cc=alexander.zuepke@hs-rm.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).