Sebastian Pop wrote:
kernel coder wrote:
is there any way in gdb to step backward.


not yet, and if this feature is implemented it should be quite
restricted, think about undoing side effects, as disk read/write...
But you can put a breakpoint before the current point, and then run
again gdb on your program.

You don't need to undo side effects for debugging purposes, you just
need to be able to recreate previous states from the point of view
of the application. So for I/O operations, you need to restore memory
to the state before the I/O operation, but you don't have to try to
somehow undo the external effects of the program, so I don't call that
a restriction at all.

The point of going backwards (a feature quite familiar to me from
the use of hardware debuggers on PC's in bygone years) is to figure
out what went wrong, and for that purpose you only need to worry
about the machine/memory state.

Reply via email to