From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA16538; Thu, 4 Oct 2001 14:39:12 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA16455 for ; Thu, 4 Oct 2001 14:39:11 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f94Cd9P08667; Thu, 4 Oct 2001 14:39:09 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA16527; Thu, 4 Oct 2001 14:39:09 +0200 (MET DST) Date: Thu, 4 Oct 2001 14:39:09 +0200 From: Xavier Leroy To: Yoann Padioleau Cc: caml-list@inria.fr Subject: Re: [Caml-list] replay debugger Message-ID: <20011004143909.A16053@pauillac.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from Yoann.Padioleau@irisa.fr on Tue, Oct 02, 2001 at 07:53:24PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk [The question was: how does the OCaml debugger implements reverse execution?] > Y'a t'il de la doc sur le fonctionnement interne du debuggger. > Comment ca marche ? comment ki fait pour revenir en arriere ? Like all "time-travel" debuggers: by periodic checkpointing. That is, it saves the state of the program from time to time, and uses these checkpoints to restore the state of the program at any time. E.g. say you stop the program and wish to execute it backwards one step. Find the most recent checkpoint, which was taken N steps ago; duplicate it, and run one copy N-1 steps forward. We learnt this trick from Andrew Tolmach's thesis: http://www.cs.pdx.edu/~apt/thesis.ps.Z The only difference between Tolmach's system and ocamldebug is that the former uses first-class continuations to capture the checkpoints, while ocamldebug uses the fork() Unix system call. Thus, each checkpoint is really a separate process, and all of them communicate with the debugger via sockets. - Xavier Leroy ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr