From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qrroe-0005bZ-5g for qemu-devel@nongnu.org; Fri, 12 Aug 2011 09:30:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qrrod-0005O7-65 for qemu-devel@nongnu.org; Fri, 12 Aug 2011 09:30:24 -0400 Received: from mel.act-europe.fr ([194.98.77.210]:45074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qrrod-0005M7-1k for qemu-devel@nongnu.org; Fri, 12 Aug 2011 09:30:23 -0400 Message-ID: <4E452AD6.5010309@adacore.com> Date: Fri, 12 Aug 2011 15:29:58 +0200 From: Elie Richa MIME-Version: 1.0 References: <1dff061de511be8246b1e86a63cbf4a8@sebastianbauer.info> In-Reply-To: <1dff061de511be8246b1e86a63cbf4a8@sebastianbauer.info> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] PPC: Fix for the gdb single step problem on an rfi instruction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sebastian Bauer Cc: qemu-devel@nongnu.org Hello, I've had this problem recently and your patch does fix the issue, thanks! Regards, Elie On 08/10/2011 01:41 PM, Sebastian Bauer wrote: > When using gdb to single step a ppc interrupt routine, the execution flow passes > the rfi instruction without actually returning from the interrupt. The patch > fixes this by avoiding to update the nip when the debug exception is raised > and a previous POWERPC_EXCP_SYNC was set. The latter is the case only, if code for > rfi or a related instruction was generated. > > Signed-off-by: Sebastian Bauer > --- > diff --git a/target-ppc/translate.c b/target-ppc/translate.c > index fd7c208..42b91fd 100644 > --- a/target-ppc/translate.c > +++ b/target-ppc/translate.c > @@ -287,7 +287,7 @@ static inline void gen_debug_exception(DisasContext *ctx) > { > TCGv_i32 t0; > > - if (ctx->exception != POWERPC_EXCP_BRANCH) > + if (ctx->exception != POWERPC_EXCP_BRANCH && ctx->exception != POWERPC_EXCP_SYNC) > gen_update_nip(ctx, ctx->nip); > t0 = tcg_const_i32(EXCP_DEBUG); > gen_helper_raise_exception(t0); > >