Everything
2.22 Saving and Restoring the States of Debug Tools

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.

Remark

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

-

Restoring the state to any among multiple states that have been stored

 

(1)

Rewinding the state of the debug tool

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.

 

[Usage]

(a)

Select the [Enable rewind feature] checkbox in the [General - Debug] category of the Option dialog box.

(b)

The state of the debug tool is automatically saved when the program starts running.

(c)

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.

Remark

A maximum number of times of rewinding can be specified with [Maximum number of times of rewinding] in the Option dialog box.

(2)

Saving and restoring the states of multiple debug tools

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.

 

[Usage]

(a)

Save the states of debug tools in one of the following three ways.

-

Select [Save debug tool state 1-4] from the [Save debug tool state] menu under the [Debug] menu.

-

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.

(b)

Restore the states of debug tools in one of the following three ways.

-

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.

-

Run debugger.DebugTool.RestoreState(fileName) in the Python console to restore the states of debug tools from a file.