How does reverse debugging work?
GDB has a new version out that supports reverse debug (see http://www.gnu.org/software/gdb/news/reversible.html ). I got to wondering how that works. To get reverse debug to work it seems to me that you need to store the entire machine state including memory for each step. This would make performance incredibly slow, not to mention using a lot of memory. How are these problems solved? I'm a gdb maintainer and one of the authors of the new reverse debugging. I'd be happy to talk about how it works. As several people have speculated, you need to save enough machine state that you can restore