[discuss] semantics, "replay debugging" vs. "reverse debugging"

teawater teawater@gmail.com
Mon Oct 20 16:08:00 GMT 2008

On Mon, Oct 20, 2008 at 09:09, Michael Snyder <msnyder@vmware.com> wrote:
> Just to make sure we're all on the same page,
> I'm gonna state what I believe is true, and invite
> discussion or contradiction.
> Replay debugging --> ability to record an execution
> sequence and "play it back" (repeat it) with some
> degree of determinism.
> Reverse debugging --> ability to make the inferior
> process "back up" to a previous state, eg. reverse
> step and reverse continue-to-breakpoint.
> They're related but not identical.  One could theoretically
> have one without the other, although in practice all
> presently existing reverse-debug targets (that I know of)
> are implemented by using record and replay.
> One could have reverse without record/replay if,
> for instance, one had a machine architecture where
> all instructions were reversable, ie. the machine
> itself could reverse-execute an instruction.

I think maybe some instruction can do it.
Such as add instruction. When it forward execute, it add some number
to a value of register. When it reverse, it can sub this number from
the value of register. It can reverse without record.

In P record, I make a interface to use it in record_t need_dasm. But I
still not use it. Maybe I can use it in the future.

> And an example of a record/replay implementation
> without reverse debugging capability would be
> Michael Chastain's (circa 1999) implementation
> of Linux system-call based record and replay, which
> could deterministically replay a recorded program
> execution, but did not have reverse-step or
> reverse-continue-to-breakpoint.

More information about the Gdb mailing list