Break

Examples of BREAK

The BREAK command pauses execution of the code and initiates Direct Mode.

The format of the BREAK command is:

        B[REAK][:tvexpr] [expr[:tvexpr][,...]]
      

Issuing a BREAK command inside a transaction destroys the Isolation of that transaction. Beacuse of the way that GT.M implements transaction processing, a BREAK within a transaction may suffer an indefinite number of restarts ("live lock").

Generally, programs in production must not include BREAK commands. Therefore, GT.M provides the ZBREAK and ZSTEP commands, which insert temporary breakpoints in the image rather than the source code. BREAKs inserted with ZBREAK only exist until the image terminates or until explicitly removed by another ZBREAK command. ZSTEP also inserts temporary BREAKs in the image that only exist for the execution of the ZSTEP command. In the GT.M debugging environment, ZBREAKs and ZSTEPs that insert BREAKs provide a more flexible and less error-prone means of setting breakpoints than coding BREAKs directly into a routine. For more information on ZBREAK and ZSTEP, refer to the sections that describe those commands.

To resume execution of the interrupted program, use the ZCONTINUE command.

GT.M displays messages identifying the source of a BREAK as:

The VIEW "BREAKMSG" mask selectively enables or disables these messages. See the section on "VIEW" for an explanation of the mask. By default, a process executing a GT.M image displays all BREAK messages.

LINKing a GT.M image with a modified GTM$DEFAULTS can alter the default for that image. For more information on GTM$DEFAULTS see the "Program Development Cycle" chapter in this manual.

When a process encounters a BREAK, it displays a prompt indicating readiness to process commands in Direct Mode. By default, Direct Mode displays the GTM> prompt. SETting the $ZPROMPT intrinsic special variable alters the prompt.