问题
Has anyone actually used a reversable debugger? The only product that Google turns up is UndoDB. It is for apparently for Linux only.
回答1:
The latest gdb version 7.0 (released this week) supports reverse debugging on a number of platforms (eg. native i386 and x86_64 linux, VMware workstation, UndoDB, and Simics simulators from Virtutech). ftp://ftp.gnu.org/pub/gdb
It works with the latest preview / pre-release of VMware workstation 7.0, which also supports reverse debugging of MSWindows guests using Visual Studio debugger. Get a free trial download of workstation 7.0 at http://communities.vmware.com/community/beta/workstation, and find some helpful usage tips here at http://communities.vmware.com/docs/DOC-10714
回答2:
The newly released gdb-7.0 includes reverse debugging capability for native linux x86 and x86_64. You can debug any linux program as usual, turn on the "recording" feature, and from that point on, if you step forward too far, you can step backward or reverse-continue to a breakpoint.
回答3:
As a amusing historical note, EXDAMS implemented a post-mortem reverse debugging back in the late 60s for MULTICS.
回答4:
The word your looking for may be "Omniscient Debugging".
Here is one: http://www.lambdacs.com/debugger/
The UndoDB page has some links to (expensive) commercial debuggers.
回答5:
VS 2010 is supposed to have something like this, I think.
回答6:
Yes, I have used Virtutech Simics with reverse since 2005. It is incredibly useful, and does make most bugs very simple to fix. Especially those related to timing and race conditions, and multicore/thread "heisenbugs".
See http://jakob.engbloms.se/archives/1547, http://jakob.engbloms.se/archives/1554, and http://jakob.engbloms.se/archives/1564 take inventory of most known reverse debugger attempts to date.
回答7:
Although this question is old, reverse-debugging remains an interesting topic, so I thought I'd post an updated answer. My thesis, Combining reverse debugging and live programming towards visual thinking in computer programming, covers some of the historical approaches, and explains the difference between omniscient debugging and true reverse debugging:
The computer, having forward-executed the program up to some point, should really be able to provide us with information about it. Such an improvement is possible, and is found in what are called omniscient debuggers. They are usually classified as reverse debuggers, although they might more accurately be described as "history logging" debuggers, as they merely record information during execution to view or query later, rather than allow the programmer to actually step backwards in time in an executing program. "Omniscient" comes from the fact that the entire state history of the program, having been recorded, is available to the debugger after execution. There is then no need to rerun the program, and no need for manual code instrumentation.
Software-based omniscient debugging started with the 1969 EXDAMS system where it was called "debug-time history-playback". The GNU debugger, GDB, has supported omniscient debugging since 2009, with its 'process record and replay' feature. TotalView, UndoDB and Chronon appear to be the best omniscient debuggers currently available, but are commercial systems. TOD, for Java, appears to be the best open-source alternative, which makes use of partial deterministic replay, as well as partial trace capturing and a distributed database to enable the recording of the large volumes of information involved.
Debuggers that do not merely allow navigation of a recording, but are actually able to step backwards in execution time, also exist. They can more accurately be described as back-in-time, time-travel, bidirectional or reverse debuggers.
The first such system was the 1981 COPE prototype ...
回答8:
You can consider using VMware's Replay Debugging, available in the latest release of VMware Workstation, e.g. see http://www.replaydebugging.com/2008/08/vmware-workstation-65-reverse-and.html. You can download a trial at http://www.vmware.com/products/ws/ and it works with Visual Studio.
(Disclaimer: I work for VMware though not on this product.)
回答9:
Yes, I've used it back in the 90th.. The Watcom C Debugger (understood FORTRAN and most other languages as well) had the option to let you step back and forward in time.
It's great, but not a big new thing...
回答10:
I am using UndoDB on Linux instead of plain gdb for every debugging session. Reverse debugging is very useful and speeds up debugging significantly. You can start debugging from the symptom of the problem (e.g. assertion failure or some wrong message is printed) and debug backwards in time, looking for the root cause of the problem.
回答11:
Mozilla rr
open source trace based reverse debugging
https://github.com/mozilla/rr
It is similar to UndoDB, but free and open source.
Only works on Linux x86 unfortunately, because such tools require advanced OS features to work efficiently.
Here is a minimal example of rr in action: How to go to the previous line in GDB?
来源:https://stackoverflow.com/questions/522619/how-to-do-bidirectional-or-reverse-debugging-of-programs