[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] target/tricore: Fix QEMU crashing when using -singl
From: |
Bastian Koppelmann |
Subject: |
[Qemu-devel] [PATCH] target/tricore: Fix QEMU crashing when using -singlestep |
Date: |
Mon, 30 Apr 2018 22:46:40 +0200 |
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 <address@hidden>
---
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] target/tricore: Fix QEMU crashing when using -singlestep,
Bastian Koppelmann <=