From: Dan Shearer <dan@shearer.org>
To: gdb@sources.redhat.com
Subject: Re: [discuss] Support for reverse-execution
Date: Mon, 16 May 2005 17:47:00 -0000 [thread overview]
Message-ID: <20050516174649.GM19642@erizo.shearer.org> (raw)
On Thu, 12 May 2005 16:08 Michael Snyder wrote at
http://sources.redhat.com/ml/gdb/2005-05/msg00145.html
> I'd like to start adding some commands to gdb to support targets
> that can perform reverse execution (eg. stepping backwards).
> This concept has been around for a number of years now, and I
> have access to a target (the Simics simulator from Virtutech)
> that does it quite handily.
I'm from Virtutech and I'd just like to put some context around this to
make the case that a reversible gdb is a very powerful tool, not just a
curiosity and certainly not specific to one company's simulator.
Reversibility takes some getting used to, so please bear with me for a
long-ish message.
Virtutech's Simics is a simulator, it does go backwards, and every
hacker who's seen it gets as excited as Michael. Simics has a debugger,
but it isn't as capable as gdb (by design) and Virtutech wants to
encourage the existance of a gdb that does reversibility. Simics
already has a gdb stub. So that's why Virtutech is here on this list.
Personally I think reversibility is the biggest advance in debugging
since source code debugging. We've got massive and complicated codebases
we're working with today and we need better productivity. Projects like
KDE, Samba and OpenOffice use valgrind+gdb. With reversibility
productivity will improve even more, I can't make valgrind reversible
but I can help with gdb. That's why I'm here in a personal capacity.
When Reversibility Becomes Useful
---------------------------------
From what I've learned with Simics, reversibility becomes a generally
useful technique when both the simulator and the problem have certain
characteristics.
The simulator needs to be able to save state universally on a networked
world of disparate computers and other electronic devices. If a whole
universe can't be run backwards including diagnostic tools running
inside the universe then reversibility loses a lot of its benefit. The
simulator must also be fast enough to debug problems in real time:
booting an OS must be reasonably quick, for example. And running
backwards must not be slow either, or debugging becomes frustrating
One benefit to the party trick of unbooting a binary-only OS is to see
whether it unboots nearly as quickly as it boots. If it does, chances as
this is reversible hardware that will improve your debugging a lot.
Reversibility helps debugging when the problem:
1. depends on rare circumstances related to a complicated network
environment, and/or
2. involves multiple large, unrelated codebases where the aggregate
behaviour is unpredictable, and/or
3. timing considerations are vital and the inputs are non-deterministic
Reversible Hardware Options
---------------------------
Right now the only fast and complete reversible hardware solution is
Simics, however there is a lot of work happening in the field.
More than a year ago CoVirt project (http://www.eecs.umich.edu/CoVirt/ )
implemented a logging/playback facility for User Mode Linux and modified
gdb to use this to provide reversible execution and debugging. The
project website has a paper titled "Debugging operating systems with
time-traveling virtual machines" that illustrates the point very well.
Around 1999 Cygnus' GPL SID simulator could execute backwards.
Development on reversibility didn't continue so I'm told because it was
seen as "party tricks". Besides SID had flexible hardware watchpoints
like "stop the CPU when an ethernet interrupt is fired" which reduced
the need to search for a particular point in execution for SID's
intended users.
There have been discussions around most of the free simulators talking
about how reversibility could be implemented. I'd guess QEMU is a likely
candidate from the interests of some of the contributors. Valgrind is
another obvious possibility.
The commercial Green Hills Time Machine system instruments real hardware
and then provides an interface for debugging it via Green Hills'
debugger that steps anywhere in the execution history of the hardware.
This might be like Michael Snyder's Tracepoints facility in gdb taken to
an extreme (I haven't used either.)
According to the prior art research done for the Simics Hindsight
whitepaper at http://virtutech.com, reversible hardware has been seen as
doable for over 30 years. Part of the problem has been in implementing
it in a very fast and general way, and the other part has been in
working out why it is so useful.
Current Availability
--------------------
Nobody outside Virtutech has access to Simics reversibility. Simics
Hindsight is due to go into (non-public) beta fairly soon. As part of
this, Virtutech has modified the Simics gdb stub so it can talk to a gdb
that supports reversibility, but this is also in-house for now. So while
Virtutech wants to have a discussion about making its closed-source
simulator available to the kinds of people who live on this list, nobody
has it yet.
Hopefully that explains what reversibility is, why it is important, and
why it is a very significant capability.
--
Dan Shearer
dan@shearer.org
next reply other threads:[~2005-05-16 17:47 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-16 17:47 Dan Shearer [this message]
2005-05-16 18:04 ` Dan Shearer
2005-05-20 18:15 ` Daniel Jacobowitz
2005-05-21 0:05 ` Frank Ch. Eigler
2005-05-21 10:13 ` Eli Zaretskii
2005-05-21 10:28 ` Russell Shaw
2005-05-21 12:38 ` Eli Zaretskii
2005-05-21 12:55 ` Russell Shaw
2005-05-21 14:39 ` Russell Shaw
2005-05-21 14:19 ` Daniel Jacobowitz
2005-05-21 15:46 ` Eli Zaretskii
2005-05-21 17:43 ` Daniel Jacobowitz
2005-05-23 19:39 ` Dan Shearer
-- strict thread matches above, loose matches on Subject: below --
2005-05-21 15:53 Paul Schlie
2005-05-20 22:11 Michael Snyder
2005-05-20 23:32 ` Paul Schlie
2005-05-20 21:59 Michael Snyder
2005-05-20 21:51 Michael Snyder
2005-05-21 9:44 ` Eli Zaretskii
2005-05-20 21:44 Michael Snyder
2005-05-20 21:25 Michael Snyder
2005-05-20 21:16 Michael Snyder
2005-05-20 21:31 ` Daniel Jacobowitz
2005-05-21 9:39 ` Eli Zaretskii
2005-05-23 18:19 ` Michael Snyder
2005-05-20 21:11 Michael Snyder
2005-05-20 21:27 ` Daniel Jacobowitz
2005-05-20 19:02 Michael Snyder
2005-05-20 20:43 ` Eli Zaretskii
2005-05-20 21:03 ` Michael Snyder
2005-05-20 15:49 Paul Schlie
2005-05-20 17:41 ` Dan Shearer
2005-05-20 22:01 ` Paul Schlie
2005-05-20 22:08 ` Daniel Jacobowitz
2005-05-20 22:43 ` Paul Schlie
2005-05-21 0:58 ` Daniel Jacobowitz
2005-05-21 1:42 ` Paul Schlie
2005-05-21 1:53 ` Daniel Jacobowitz
2005-05-21 1:56 ` Daniel Jacobowitz
2005-05-21 15:03 ` Paul Schlie
2005-05-21 14:13 ` Paul Schlie
2005-05-21 14:23 ` Daniel Jacobowitz
2005-05-21 15:04 ` Paul Schlie
2005-05-20 20:58 ` Michael Snyder
2005-05-20 21:35 ` Paul Schlie
2005-05-19 1:23 Dan Shearer
2005-05-19 13:01 ` Johan Rydberg
2005-05-19 13:18 ` Daniel Jacobowitz
2005-05-19 13:47 ` Johan Rydberg
2005-05-20 10:37 ` Eli Zaretskii
2005-05-20 11:37 ` Andreas Schwab
2005-05-20 13:18 ` Daniel Jacobowitz
2005-05-20 13:36 ` Fabian Cenedese
2005-05-20 13:47 ` Daniel Jacobowitz
2005-05-20 14:41 ` Eli Zaretskii
2005-05-20 22:14 ` Daniel Jacobowitz
2005-05-20 12:22 ` Johan Rydberg
2005-05-20 13:19 ` Daniel Jacobowitz
2005-05-20 14:12 ` Eli Zaretskii
2005-05-20 13:14 ` Daniel Jacobowitz
2005-05-20 14:34 ` Eli Zaretskii
2005-05-20 15:40 ` Johan Rydberg
2005-05-20 10:47 ` Eli Zaretskii
2005-05-12 23:08 Michael Snyder
2005-05-13 6:23 ` Eli Zaretskii
2005-05-19 13:46 ` Daniel Jacobowitz
2005-05-19 18:46 ` Michael Snyder
2005-05-19 19:26 ` Johan Rydberg
2005-05-20 10:55 ` Eli Zaretskii
2005-05-20 13:04 ` Daniel Jacobowitz
2005-05-20 14:30 ` Eli Zaretskii
2005-05-20 14:43 ` Andreas Schwab
2005-05-20 20:48 ` Michael Snyder
2005-05-20 20:51 ` Daniel Jacobowitz
2005-05-20 20:38 ` Michael Snyder
2005-05-20 15:05 ` Vladimir Prus
2005-05-20 15:58 ` Eli Zaretskii
2005-05-20 18:14 ` Daniel Jacobowitz
2005-05-20 18:30 ` Eli Zaretskii
2005-05-20 19:27 ` Stan Shebs
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=20050516174649.GM19642@erizo.shearer.org \
--to=dan@shearer.org \
--cc=gdb@sources.redhat.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