* [Qemu-devel] [PATCH] target/tricore: Fix QEMU crashing when using -singlestep
@ 2018-04-30 20:46 Bastian Koppelmann
0 siblings, 0 replies; only message in thread
From: Bastian Koppelmann @ 2018-04-30 20:46 UTC (permalink / raw)
To: qemu-devel
when -singlestep is enabled we will actually return a tb->size of 0,
even though we emit one instruction. This is because we do the update to ctx.pc
after exiting the translation loop on the singlestep path. Therefore we
substract pc_start from ctx.pc, aka pc_start.
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
---
target/tricore/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/tricore/translate.c b/target/tricore/translate.c
index aef0d9cf06..be2579d189 100644
--- a/target/tricore/translate.c
+++ b/target/tricore/translate.c
@@ -8843,12 +8843,12 @@ void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb)
ctx.opcode = cpu_ldl_code(env, ctx.pc);
decode_opc(env, &ctx, 0);
+ ctx.pc = ctx.next_pc;
if (num_insns >= max_insns || tcg_op_buf_full()) {
gen_save_pc(ctx.next_pc);
tcg_gen_exit_tb(0);
break;
}
- ctx.pc = ctx.next_pc;
}
gen_tb_end(tb, num_insns);
--
2.11.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-04-30 20:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-30 20:46 [Qemu-devel] [PATCH] target/tricore: Fix QEMU crashing when using -singlestep Bastian Koppelmann
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).