摘要 |
A computer program is executed in a forward direction to create a current state of registers and memory for the program. During the forward execution of the program, the pre-existing values of registers and memory changed by each instruction are recorded in a main log. During interactive debugging, reverse execution is simulated by displaying the contents of specified registers or memory locations. For each specified register or memory location, the main log is searched in a forward direction beginning at a specified time in the past and continuing until a value is found, or until the end of the main log is reached and a value is taken from the current state for the computer program. After simulated execution in reverse, the user may specify a changed value for a specified register or memory location, and then forward instruction interpretation is begun using the changed value, without changing the current state. New values of registers and memory locations generated by forward interpretation are recorded in an alternative log. Values of registers and memory accessed by forward-interpreted instructions are fetched by first searching the alternative log in a reverse direction, and when a value is not found in the alternative log, the main log is searched in a forward direction as described above. Moreover, at any time during forward interpretation, the user may specify a changed value, the change is logged in an alternative log, and forward interpretation continues.
|