From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22781 invoked by alias); 16 Sep 2008 18:50:58 -0000 Received: (qmail 22772 invoked by uid 22791); 16 Sep 2008 18:50:57 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.113.40.141) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 16 Sep 2008 18:50:23 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.64.160]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id D1CA76961; Tue, 16 Sep 2008 11:50:21 -0700 (PDT) Received: from [10.20.92.218] (promb-2s-dhcp218.eng.vmware.com [10.20.92.218]) by mailhost2.vmware.com (Postfix) with ESMTP id B52C58E54B; Tue, 16 Sep 2008 11:50:21 -0700 (PDT) Message-ID: <48CFFF7B.4020805@vmware.com> Date: Tue, 16 Sep 2008 18:50:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: teawater , Michael Snyder , "gdb-patches@sourceware.org" Subject: Re: [reverse RFA] no singlestep-over-BP in reverse References: <48CEAA05.8050006@vmware.com> <20080916152159.GA23026@caradoc.them.org> In-Reply-To: <20080916152159.GA23026@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/msg00360.txt.bz2 Daniel Jacobowitz wrote: > On Tue, Sep 16, 2008 at 11:03:42PM +0800, teawater wrote: >> 1. The instruction in this address already reverse executed, it make >> program status back to before forward execute this instruction. > > I like this approach; I believe it's what we used in the qemu reverse > implementation also. It means that you have the same state when > you're pointing at the start of a source line: it has not yet executed. Yes, this is also the behavior of the Simics (Virtutech) reverse engine, and VMware's implementation, and gdb-freeplay. I think it's the only correct choice, frankly. Suppose my source statement is: x = -1; and suppose my architecture implements that in a single instruction. If x == -1 after the statement, but x == 0 before the statement, then reverse-executing the statement has no meaning unles it changes the value of x back to its pre-execution value.