From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22740 invoked by alias); 15 Sep 2008 19:07:45 -0000 Received: (qmail 22582 invoked by uid 22791); 15 Sep 2008 19:07:45 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 15 Sep 2008 19:07:10 +0000 Received: from mailhost5.vmware.com (mailhost5.vmware.com [10.16.68.131]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 149D159006; Mon, 15 Sep 2008 12:07:08 -0700 (PDT) Received: from [10.20.92.218] (promb-2s-dhcp218.eng.vmware.com [10.20.92.218]) by mailhost5.vmware.com (Postfix) with ESMTP id 09344DC099; Mon, 15 Sep 2008 12:07:08 -0700 (PDT) Message-ID: <48CEB1F5.6080902@vmware.com> Date: Mon, 15 Sep 2008 19:07:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Michael Snyder , "gdb-patches@sourceware.org" , teawater Subject: Re: [reverse RFA] no singlestep-over-BP in reverse References: <48CEAA05.8050006@vmware.com> <20080915184245.GA21388@caradoc.them.org> In-Reply-To: <20080915184245.GA21388@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-09/txt/msg00339.txt.bz2 Daniel Jacobowitz wrote: > On Mon, Sep 15, 2008 at 11:31:33AM -0700, Michael Snyder wrote: >> When we're stopped at a breakpoint and we want to >> continue in reverse, we're not actually going to >> execute the instruction at the breakpoint -- we're >> going to de-execute the previous instruction. >> >> Therefore there's no need to singlestep before >> inserting breakpoints. In fact it would be a bad >> idea to do so, because if there is a breakpoint at >> the previous instruction, we WANT to hit it. >> >> Note that this patch is to be applied to the reverse branch. > > If there is a breakpoint on the previous instruction, will you hit it > before or after de-executing that instruction? Well, if trap insns are in place, that's what will be executed (not the shadow insn). > It seems like this > logic should be somehow still necessary... but I can't put my finger > on when. Good point -- there is a test in the testsuite for consecutive breakpoints. I'll try to reversify that.