Debugger : Generating Prototype Code With Debugging Facilities : Prototype Behavior In Debugging Session

Prototype Behavior In Debugging Session

Switching from execution mode to debug mode and entering debugging commands can have unintended side effects in a real-time system. This is because, in debug mode, input events are not processed and the Debugger commands may put the system into a status that could not have otherwise been reached. More specifically, during the time the debugging prototype is in debug mode, the following takes place:

All changes of events, conditions and data-items produced by the specification’s environment are ignored. In debug mode, these elements can be changed only via debugging commands.
System time is not advanced. As a consequence, time-out events and scheduled actions are delayed. They progress in time only when the execution is not in debug mode.

Note that in many practical situations, you may have enough control of the actual environment to avoid the loss of events and values. For example, assume that the interaction with the prototype is performed via a graphic control panel and events are generated by clicking the mouse on graphical buttons. In this situation, no events are generated and lost if you refrain from clicking any of the graphical buttons while in the debug mode.

Also, if necessary, you can explicitly enter the events and other value changes that are needed to get correct prototype behavior manually, via the appropriate Debugger commands (SET EVENT, SET CONDITION, and SET DATA_ITEM). This must be done with caution since all these events and value changes are considered as happening simultaneously, at the first step that follows the resumption of the execution.

Switching from execution mode to debug mode does not, by itself, cause any change in the current status. Entering debug mode is different from the Rational Statemate suspend action. In particular, conditions of type hanging(A) do not become true. Similarly, resuming the execution does not make these conditions false.