Message ID | 20100413182130.e8ae2da6.takasi-y@ops.dti.ne.jp |
---|---|
State | New |
Headers | show |
On Tue, Apr 13, 2010 at 6:21 PM, <takasi-y@ops.dti.ne.jp> wrote: > Hi, >> So for the already-translated code, we will miss singlestep? > At least SH4(and mips?) shows such behaviour. > I think a patch below enables single stepping in such case, too. > But, I'm not sure if this behaviour is on purpose, nor this patch is correct. > /yoshii > > diff --git a/target-sh4/translate.c b/target-sh4/translate.c > index 3537f8c..dfa724a 100644 > --- a/target-sh4/translate.c > +++ b/target-sh4/translate.c > @@ -300,7 +300,7 @@ static void gen_goto_tb(DisasContext * ctx, int n, target_ulong dest) > tb = ctx->tb; > > if ((tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK) && > - !ctx->singlestep_enabled) { > + !ctx->singlestep_enabled && !singlestep) { > /* Use a direct jump if in same page and singlestep not enabled */ > tcg_gen_goto_tb(n); > tcg_gen_movi_i32(cpu_pc, dest); > The first glance: because you are patching translate.c, I dont think you fixed the problem. Thanks, J
diff --git a/target-sh4/translate.c b/target-sh4/translate.c index 3537f8c..dfa724a 100644 --- a/target-sh4/translate.c +++ b/target-sh4/translate.c @@ -300,7 +300,7 @@ static void gen_goto_tb(DisasContext * ctx, int n, target_ulong dest) tb = ctx->tb; if ((tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK) && - !ctx->singlestep_enabled) { + !ctx->singlestep_enabled && !singlestep) { /* Use a direct jump if in same page and singlestep not enabled */ tcg_gen_goto_tb(n); tcg_gen_movi_i32(cpu_pc, dest);
Hi, > So for the already-translated code, we will miss singlestep? At least SH4(and mips?) shows such behaviour. I think a patch below enables single stepping in such case, too. But, I'm not sure if this behaviour is on purpose, nor this patch is correct. /yoshii