From patchwork Tue Apr 13 09:21:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: takasi-y@ops.dti.ne.jp X-Patchwork-Id: 50052 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F3C9DB7C67 for ; Tue, 13 Apr 2010 19:31:18 +1000 (EST) Received: from localhost ([127.0.0.1]:53912 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1cLS-00073T-7T for incoming@patchwork.ozlabs.org; Tue, 13 Apr 2010 05:23:46 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1cJT-00073I-U8 for qemu-devel@nongnu.org; Tue, 13 Apr 2010 05:21:44 -0400 Received: from [140.186.70.92] (port=32840 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1cJR-000737-Mv for qemu-devel@nongnu.org; Tue, 13 Apr 2010 05:21:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1cJQ-0008NN-G4 for qemu-devel@nongnu.org; Tue, 13 Apr 2010 05:21:41 -0400 Received: from smtp09.dti.ne.jp ([202.216.231.184]:62420) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1cJQ-0008LW-0R for qemu-devel@nongnu.org; Tue, 13 Apr 2010 05:21:40 -0400 Received: from genny.localdomain (49.14.32.202.bf.2iij.net [202.32.14.49]) by smtp09.dti.ne.jp (3.11s) with ESMTP AUTH id o3D9LVnV021098; Tue, 13 Apr 2010 18:21:31 +0900 (JST) Date: Tue, 13 Apr 2010 18:21:30 +0900 From: takasi-y@ops.dti.ne.jp To: Jun Koi Message-Id: <20100413182130.e8ae2da6.takasi-y@ops.dti.ne.jp> In-Reply-To: References: X-Mailer: Sylpheed 3.0.2 (GTK+ 2.18.7; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Solaris 9 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] Re: Missing singlestep for already-translated code? X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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);