Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do bidirectional or reverse debugging of programs?

Has anyone actually used a reversable debugger? The only product that Google turns up is UndoDB. It is for apparently for Linux only.

like image 972
casualcoder Avatar asked Feb 06 '09 23:02

casualcoder


People also ask

What is reverse debugging?

“Reverse debugging is the ability of a debugger to stop after a failure in a program has been observed and go back into the history of the execution to uncover the reason for the failure.” If you think about it, this is the logical way of debugging.

How do code debuggers work?

The simplified answer is: When you put a break-point into the program, the debugger replaces your code at that point with a int3 instruction which is a software interrupt. As an effect the program is suspended and the debugger is called.

Can you go back in a debugger?

So, if you've just taken a step in live debugging (F10 or F11), you can use the Step Backward button to quickly navigate to the previous step.


1 Answers

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

like image 117
Michael Snyder Avatar answered Sep 20 '22 21:09

Michael Snyder