Table of Contents Previous topic Next topic
Code and Data Coverage->Code Coverage
The simulator keeps track of which program instructions have been executed. If Show Code Coverage is enabled from the Options menu, then these executed instructions will be highlighted.
In disassembly mode, the background colour for executed instructions is pale green instead of white. In source code mode, a pale green marker is displayed next to the source lines that have been executed.
Since the simulator always keeps track of executed instructions regardless of the Show Code Coverage setting, when you enable this setting the disassembly view will show all of the instructions that have been executed since the program started. However, since there is an overhead associated with converting an instruction address into a source code line number, this conversion is only done when Show Code Coverage is enabled.
Therefore source files will only show the source lines that have been executed while this option is enabled.
Code coverage information is cleared when the program is restarted.
Code coverage information is stored with the rest of the state data and so when you restore a captured state the disassembly view will show the code coverage for the captures state. However the code coverage displayed in the source code views will not change.
The Show Code Coverage setting is saved in the status file and so will be restored when you restart the simulator.