(Inspired by http://developers.slashdot.org/developers/05/03/10/1731230.shtml?tid=156&tid=218)

I can understand having to build something crazy like Hindsight for traditional programs. But, we already run on a VM. Why can't we do something like this? Or, would it be more appropriate for Parrot? Or, am I just being crazy?

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

  • Comment on Reversing Perl execution in the debugger?

Replies are listed 'Best First'.
Re: Reversing Perl execution in the debugger?
by Anonymous Monk on Mar 11, 2005 at 15:42 UTC
    Just do a 'fork/wait (in parent)' after each op (and insert a breakpoint after the wait). Going back N steps mean killing N children. ;-)
Re: Reversing Perl execution in the debugger?
by Joost (Canon) on Mar 11, 2005 at 15:01 UTC
Re: Reversing Perl execution in the debugger?
by ww (Archbishop) on Mar 11, 2005 at 18:20 UTC
    and, pursuing the /. thread a bit,
    lambdacs.com/debugger/debugger.html"
    basicly, according to lambdacs' litterature, stores ALL variable assignments, globally
          (and eternally?)!
Re: Reversing Perl execution in the debugger?
by Whitehawke (Pilgrim) on Mar 11, 2005 at 20:48 UTC
    As a refugee from C++ on Windows I will say that, in MS Visual Studio, it is possible to "move execution point to here". This isn't exactly the same as rewinding execution--it doesn't play well with leaving the current stack frame, for example--but it comes pretty close; you can generally reconstruct the program state you care about by hand. The primary use case (IME) for "backing up" in a debugger is to make a change in a variable and then repeat the last few lines. This should be well within perl's, and Parrot's, abilities.
Re: Reversing Perl execution in the debugger?
by perrin (Chancellor) on Mar 11, 2005 at 18:54 UTC
    I could swear I remember someone saying this had been implemented in a recent perl. Maybe it got cut at the last minute. It came up at OSCON last year.