Reversible Debugging in GDB 7
September 26th, 2009
GDB 7 will have “reverse step”, “reverse continue”, and several other commands to step backward through a program’s execution. This is seriously cool—I wonder whether it will make debugging concurrent programs easier too?
This is now the same, what ‘up’ & ‘down’ commands do? What is the ‘step’ in case, when we talking about many concurent threads?
No, it’s not the same as “up” and “down”. reverse-step is just like step, except that it runs the program backwards.
The problem of doing reverse-step in the presence of threads is just like the problem of doing forward-step. There is some ambiguity about what the debugger should do if we are in the process of stepping one thread when another thread gets scheduled (or our thread gets un-scheduled).
The best I can say is that we try to do the same thing in reverse-step as we would do in step. Ideally, we keep the debugger’s “point of view” fixed in one thread, unless another thread happens to hit a breakpoint while we are stepping.