<@knife> does that mean it puts bugs back into the program?
<@knife> :P
The new GDB version 7.0 is supposed to be released this month and will finally have reversible debugging features. It will be supported on Native i386 Linux and AMD64 along with several remote targets. GDB is every hackers favorite debugger and I am sure you will all be excited about these new commands.
- reverse-continue ('rc') -- Continue program being debugged but run it in reverse
- reverse-finish -- Execute backward until just before the selected stack frame is called
- reverse-next ('rn') -- Step program backward, proceeding through subroutine calls.
- reverse-nexti ('rni') -- Step backward one instruction, but proceed through called subroutines.
- reverse-step ('rs') -- Step program backward until it reaches the beginning of a previous source line
- reverse-stepi -- Step backward exactly one instruction
- set exec-direction (forward/reverse) -- Set direction of execution.
All subsequent execution commands (continue, step, until etc.) will run the program being debugged in the selected direction.
Breakpoints and watchpoints will work in reverse -- allowing you for instance to proceed directly to the previous point at which a variable was modified.
http://www.gnu.org/software/gdb/news/reversible.html
http://sourceware.org/gdb/wiki/ReversibleDebugging
There is a tutorial for reverse debugging in gdb:
ReplyDeletehttp://www.sourceware.org/gdb/wiki/ProcessRecord/Tutorial