Skip to contentSkip to conversation

[5472] SH4: fix single-stepping

Qemu-devel Aurelien Jarno 1 participant 1 message Oct 12, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5472

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5472
Author:   aurel32
Date:     2008-10-12 23:32:48 +0000 (Sun, 12 Oct 2008)

Log Message:
-----------
SH4: fix single-stepping

* target-sh/translate.c (gen_intermediate_code_internal): If singlestep is enabled, update PC before stopping.

(Vladimir Prus)

Modified Paths:
--------------
trunk/target-sh4/translate.c

Modified: trunk/target-sh4/translate.c
===================================================================

target-sh4/translate.c +1 -0
@@ -1867,6 +1867,7 @@
     if (tb->cflags & CF_LAST_IO)
         gen_io_end();
     if (env->singlestep_enabled) {
+        tcg_gen_movi_i32(cpu_pc, ctx.pc);
         tcg_gen_helper_0_0(helper_debug);
     } else {
 	switch (ctx.bstate) {