caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <xavier.leroy@inria.fr>
To: Yoann Padioleau <Yoann.Padioleau@irisa.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] replay debugger
Date: Thu, 4 Oct 2001 14:39:09 +0200	[thread overview]
Message-ID: <20011004143909.A16053@pauillac.inria.fr> (raw)
In-Reply-To: <wi6pu86nd2j.fsf@kochab.irisa.fr>; from Yoann.Padioleau@irisa.fr on Tue, Oct 02, 2001 at 07:53:24PM +0200

[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


  reply	other threads:[~2001-10-04 12:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-02 17:53 Yoann Padioleau
2001-10-04 12:39 ` Xavier Leroy [this message]
2001-11-26 14:51   ` Fergus Henderson
2001-11-26 16:14     ` Xavier Leroy
2001-11-26 18:40     ` [Caml-list] Beware of compare (and Ocaml beaten by Java) Mattias Waldau
2001-11-27  9:21       ` Xavier Leroy
2001-11-27  9:41         ` Mattias Waldau
2001-11-30  9:12           ` Pierre Weis
2001-12-03 21:37             ` Chris Hecker
2001-11-27 17:03         ` [Caml-list] bytegen.comp_expr error when doing object copying Neil Inala
2001-11-28 20:15           ` Xavier Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011004143909.A16053@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=Yoann.Padioleau@irisa.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).