From: "Frederic Riss" <frederic.riss@gmail.com>
To: "Michael Snyder" <msnyder@vmware.com>
Cc: gdb@sourceware.org
Subject: Re: [discuss] semantics, "replay debugging" vs. "reverse debugging"
Date: Mon, 20 Oct 2008 08:11:00 -0000 [thread overview]
Message-ID: <87d3b2040810200110x714f8888ybbfd492da49eb2ee@mail.gmail.com> (raw)
In-Reply-To: <48FBDA34.6020104@vmware.com>
Hello,
2008/10/20 Michael Snyder <msnyder@vmware.com>:
> 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.
For what it's worth, I spent some evenings a few weeks ago starting a
remote reversible gdbserver implementation as a valgrind skin. I've
the 'record' part nearly done, but I've stopped working on it due to
personal priorities inversion. My idea was that I'd use the recorded
history to reverse the execution, but that I'd let the virtual
processor do the replay itself (ie. simply let the target run form the
state I would have restored).
Of course, I was aware that some syscalls aren't 'reversible' and I
was wondering how to report that to the user. My first idea was to
just say: "You're using reverse debugging, watch your steps!". I see
that 'replaying' the history can be useful in such cases, and I could
certainly implement that on top of my history record.
However, now I'm wondering: can't the current implementations 'rewrite
the past'? My scheme of record->reverse->rerun was expected to allow
the user to modify thing in the past execution and then watch the
consequences. If it's possible for them, where is the decision made
when to switch between replay and rerun?
Take the above with a grain of salt, as I haven't worked on that
project for quite some time, and I haven't yet implemented the
reverse/rerun part.
Fred.
> 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.
>
> 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.
>
next prev parent reply other threads:[~2008-10-20 8:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-20 1:14 Michael Snyder
2008-10-20 8:11 ` Frederic Riss [this message]
2008-10-20 16:08 ` teawater
2008-10-21 7:29 ` Jakob Engblom
2008-10-22 3:26 ` teawater
2008-10-22 13:37 ` Daniel Jacobowitz
2008-10-22 16:19 ` teawater
2008-10-22 16:43 ` teawater
2008-10-22 16:48 ` teawater
2008-10-22 17:09 ` Dave Korn
2008-10-22 17:19 ` teawater
2008-10-22 18:14 ` Michael Snyder
2008-10-22 19:38 ` Jakob Engblom
2008-10-23 3:46 ` teawater
2008-10-23 8:35 ` Jeremy Bennett
2008-10-23 10:43 ` Jakob Engblom
2008-10-23 3:39 ` teawater
2008-10-21 7:27 ` Jakob Engblom
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=87d3b2040810200110x714f8888ybbfd492da49eb2ee@mail.gmail.com \
--to=frederic.riss@gmail.com \
--cc=gdb@sourceware.org \
--cc=msnyder@vmware.com \
/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