An invention is provided for debugging a computer program. Program information
is recorded in a trace buffer. The program information generally includes write
accesses from the computer program and the execution path of the computer program.
In addition, a memory image snapshot of at least a portion of memory being utilized
by the computer program is captured. Simulated re-execution of the computer program
then occurs by adjusting the state of the memory image snapshot based on the program
information. Further, debugging logic can be inserted into a simulated re-execution
at particular points in the computer program. In particular, the debugging logic
does not change the trace buffer or the memory image snapshot, and as such, do
not alter the captured sequence events being debugged.