From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1cmd-0001cO-FM for qemu-devel@nongnu.org; Tue, 13 Apr 2010 05:51:51 -0400 Received: from [140.186.70.92] (port=49888 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1cma-000132-Bk for qemu-devel@nongnu.org; Tue, 13 Apr 2010 05:51:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1cju-0001kv-7i for qemu-devel@nongnu.org; Tue, 13 Apr 2010 05:49:06 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:63154) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1cjt-0001kN-TR for qemu-devel@nongnu.org; Tue, 13 Apr 2010 05:49:02 -0400 Received: by pwi6 with SMTP id 6so4932196pwi.4 for ; Tue, 13 Apr 2010 02:49:00 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20100413182130.e8ae2da6.takasi-y@ops.dti.ne.jp> References: <20100413182130.e8ae2da6.takasi-y@ops.dti.ne.jp> From: Jun Koi Date: Tue, 13 Apr 2010 18:48:40 +0900 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: Missing singlestep for already-translated code? List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: takasi-y@ops.dti.ne.jp Cc: qemu-devel@nongnu.org On Tue, Apr 13, 2010 at 6:21 PM, 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 corr= ect. > /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, ta= rget_ulong dest) > =A0 =A0 tb =3D ctx->tb; > > =A0 =A0 if ((tb->pc & TARGET_PAGE_MASK) =3D=3D (dest & TARGET_PAGE_MASK) = && > - =A0 =A0 =A0 !ctx->singlestep_enabled) { > + =A0 =A0 =A0 !ctx->singlestep_enabled && !singlestep) { > =A0 =A0 =A0 =A0/* Use a direct jump if in same page and singlestep not en= abled */ > =A0 =A0 =A0 =A0 tcg_gen_goto_tb(n); > =A0 =A0 =A0 =A0 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