From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7269 invoked by alias); 21 Oct 2009 15:40:31 -0000 Received: (qmail 7246 invoked by uid 22791); 21 Oct 2009 15:40:29 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 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.43rc1) with ESMTP; Wed, 21 Oct 2009 15:40:24 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id EBFCA3A033; Wed, 21 Oct 2009 08:40:22 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost3.vmware.com (Postfix) with ESMTP id E2196CD959; Wed, 21 Oct 2009 08:40:22 -0700 (PDT) Message-ID: <4ADF29E3.3040308@vmware.com> Date: Thu, 22 Oct 2009 06:31:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Greg Law CC: Marc Khouzam , 'Hui Zhu' , "'gdb@sourceware.org'" Subject: Re: [FYI] tutorial for process record and reverse debugging References: <4ADA4BD8.6080800@vmware.com> <4ADCAD14.3080407@vmware.com> <4ADE1824.8090701@vmware.com> <4ADE2502.5060201@undo-software.com> In-Reply-To: <4ADE2502.5060201@undo-software.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00337.txt.bz2 Greg Law wrote: > Michael Snyder wrote: >> [...] >>>> 3) I'm in replay mode, possibly in the middle of the recording, >>>> and I want to switch to record mode. Now there are several >>>> branching possibilities: Do I want to: >>>> >>>> a) Go to the end and start appending to the existing log? >>> I can understand someone wanting this. >>> >>>> b) Truncate the existing log at the point where I am, and >>>> start appending to the prefix? >>> I never thought of this case. I see now that for non-deterministic >>> executions this could have value. >> Not just that, though. This is also what happens if we >> change a memory or register value, eg. a variable that >> controls a conditional branch. We auto-delete the trailing >> part of the execution log, because now we're going to go >> forward in a different direction. > > But what would we do about "external state"? Well, I had only been talking in the context of process record, which doesn't really deal all that well with external state, as far as I know. It's fine to open up the discussion to general reverse debugging, but I think at some point different implementations are going to have to have their own separate, dedicated commands (as process record presently does). Of course, the more generality, the better! > Example, say I'm debugging a web-server, and half way through a > connection I go back, then truncate the log and start again in a new > direction. And clients "mid-session" with the webserver are liable to > get mighty confused. Speaking only for process record, I don't think process record could handle that situation well. It's called process record for one reason because it only handles one process at a time (in fact, currently only one thread at a time).