qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] target/riscv: Print CPU and privledge in disas
@ 2019-09-27  0:45 Alistair Francis
  2019-09-27  3:07 ` Bin Meng
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Alistair Francis @ 2019-09-27  0:45 UTC (permalink / raw)
  To: qemu-devel, qemu-riscv; +Cc: alistair23, palmer, alistair.francis

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 target/riscv/translate.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/target/riscv/translate.c b/target/riscv/translate.c
index adeddb85f6..537af0003e 100644
--- a/target/riscv/translate.c
+++ b/target/riscv/translate.c
@@ -810,7 +810,14 @@ static void riscv_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
 
 static void riscv_tr_disas_log(const DisasContextBase *dcbase, CPUState *cpu)
 {
+#ifndef CONFIG_USER_ONLY
+    RISCVCPU *rvcpu = RISCV_CPU(cpu);
+    CPURISCVState *env = &rvcpu->env;
+#endif
     qemu_log("IN: %s\n", lookup_symbol(dcbase->pc_first));
+#ifndef CONFIG_USER_ONLY
+    qemu_log("CPU: %d; priv: "TARGET_FMT_ld"\n", cpu->cpu_index, env->priv);
+#endif
     log_target_disas(cpu, dcbase->pc_first, dcbase->tb->size);
 }
 
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-09-27 21:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-27  0:45 [PATCH v1 1/1] target/riscv: Print CPU and privledge in disas Alistair Francis
2019-09-27  3:07 ` Bin Meng
2019-09-27  9:09 ` Philippe Mathieu-Daudé
2019-09-27 17:03   ` Alistair Francis
2019-09-27 17:17 ` Richard Henderson
2019-09-27 17:23   ` Alistair Francis
2019-09-27 17:53     ` Richard Henderson
2019-09-27 21:29       ` Alistair Francis

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).