Saving the states of debug tools (readable and writable memory and register values) enables restoring the states in which the state information for the debug tools was saved.
If you have selected [Save the value of SFRs and IORs added in the Watch 4 panel] in the [General - Debug] category of the Option dialog box, the values of SFRs and IORs will also be saved. |
Saving and restoring the states of debug tools is mainly used to realize the following two features.
Rewinding the state of the debug tool to restore the state when the execution of a program was started after the program has been repeatedly run and stopped |
The state of the debug tool can be restored to that before the program started running after the program has been repeatedly run and stopped.
Select the [Enable rewind feature] checkbox in the [General - Debug] category of the Option dialog box. |
After the program has been repeatedly run and stopped, select [Rewind debug tool state] from the [Debug] menu or press the [Ctrl] + [F11] keys to restore the state to that before the program started running. |
A maximum number of times of rewinding can be specified with [Maximum number of times of rewinding] in the Option dialog box. |
The states of multiple debug tools can be saved and restored.
For example, you can save the states for functions being debugged which are not frequently called and restore the states for debugging many times.
Select [Save debug tool state 1-4] on the [State save event] tab in the Action Events dialog box. Executing the instruction at the address specified in the dialog box saves the states. |
Run debugger.DebugTool.SaveState(fileName) in the Python console to save the states of debug tools in a file. |
Select [Restore debug tool state 1-4] from the [Save debug tool state] menu under the [Debug] menu. |
Select [Restore debug tool state 1-4] on the [State save event] tab in the Action Events dialog box. Executing the instruction at the address specified in the dialog box restores the states and continues the execution of the program from the saved states. |