HP 3000 Manuals

AT [ HPTOOLSET XL Reference Manual ] MPE/iX 5.0 Documentation


HPTOOLSET XL Reference Manual

AT 

Sets the breakpoint in a user program.

Syntax 

     AT {location} [ |EVERY| n |TIMES| ] [FOR { n } |TIMES| ]
        {   NEXT }                       [    {ALL}         ]

        [DO  [ command-list ] ]
             [ (BREAK)      ]

Parameters 

Location         Paragraph name, section name, subprogram name, function
                 name, procedure name, label name, or line number at
                 which you want your program to break.  The location may
                 be referenced with an offset such as PROC#25.

                 The breakpoint is set immediately preceding the first
                 executable statement of the location you specify.

NEXT             Specifies a breakpoint to be set at the beginning of the
                 next section, paragraph or procedure and every
                 succeeding section, paragraph or procedure.  You cannot
                 abbreviate NEXT. In Pascal, a breakpoint is also set at
                 the end of every procedure.

EVERY n TIMES    Specifies that the breakpoint you set will cause an
                 interruption every nth time it occurs.  The interruption
                 occurs before the execution of the statement located at
                 the breakpoint.  The default value of n is 1.

FOR n TIMES      This clause specifies that the breakpoint be cleared
                 after it has executed n times, where n is an integer.
                 The default is to set a permanent breakpoint.

DO               Specifies that one or more TOOLSET/XL commands be
                 performed when the breakpoint occurs.  The default is to
                 BREAK and prompt you for your command.

Command-list     Takes the form (command [; command] ...)  where the
                 command is a TOOLSET/XL command.

Description 

The AT command allows you to set up 15 active breakpoints in your user
program.  When the breakpoint in your program is reached, control is
passed to the DO command list.  If there is no DO command list, control
is passed to you through the TOOLSET/XL command interpreter.

You can specify that a TOOLSET/XL command(s) be performed when a
breakpoint occurs by using the DO command list parameter.  If one of
these commands is the BREAK, RESUME, or SYSDEBUG command, the remainder
of the command list will be terminated when that command is executed;
otherwise, after all the commands in the list have been executed,
Symbolic Debug will execute a BREAK command.

Statement Number/Current Procedure (Pascal)

If you are setting a breakpoint at a location within the current
procedure, only the statement number needs to be specified.  If the
breakpoint you are setting is outside of the current level 1 procedure,
the procedure or label name must be used as well.

Setting Breakpoints at Withs

Because the Pascal compiler generates the same statement number for a
WITH and its BEGIN statement, a breakpoint set at the WITH will be set at
the BEGIN statement.

In the following example, the breakpoint is logically set at statement
number 37 immediately before F2:=15; is executed.

     >> AT #36
     -->BREAKPOINT SET

     Listing File
     34   PROCEDURE P1;
     35    BEGIN
     36      WITH VAR1 DO
     37      BEGIN
     37          F2 := 15;
     38          F1 :=  5;

Breakpoints in Subroutines (FORTRAN)

You can set breakpoints anywhere inside a subroutine or function under
the same rules as for Pascal.

Example 

COBOL 

     (1)  >>AT MY-SUBP#112

Sets a breakpoint at line 112 in the subprogram MY-SUBP. The breakpoint
can be specified by the paragraph name as in example 2 or by line number
as in this example.

     (2)  >>AT PARA-1 OF MY-SUBP

Sets a breakpoint at line 112 in the subprogram MY-SUBP.

     (3)  >>AT COMP-COST FOR ALL DO (DISPLAY COST-CNTR; RESUME)

Sets a breakpoint at the paragraph heading COMP-COST in the current
program.  The breakpoint will occur before the first executable statement
following COMP- COST. Every time COMP-COST is executed, the current value
of COST-CNTR will be displayed and your program will resume execution.

Pascal 

     (1)  >>AT NEXT DO (DISPLAY F1;BREAK)

This example sets a breakpoint at the beginning and end of the next
procedure and every succeeding procedure.  At each breakpoint, the value
of variable F1 is displayed and program execution is suspended.  The same
result would occur if the BREAK was not included in the command list.

If you want execution to automatically resume after the value of F1 is
displayed, replace BREAK with RESUME in the command list above.

     (2)  >>AT PROC1.PROC2.PROC3.PROC4.

Sets a breakpoint at the beginning of the level 4 procedure PROC4.

     (3)  >>AT PROC1.PROC4

Sets a breakpoint at the beginning of the level 4 procedure.  One only
needs full qualification as shown in example 2 when there is a duplicate
procedure name.


NOTE In Pascal, setting a breakpoint at a WHILE statement will return control to Toolset only once, the first time the WHILE statement is executed, even though the WHILE loop may be executed more than once by the program. This is due to the machine instruction set of the Precision Architecture.
FORTRAN (1) >>AT SUBR1.15 DO (DISPLAY VAR1) This example sets a breakpoint at the numeric label 15, within the subroutine SUBR1, at which point it will display the contents of VAR1.


MPE/iX 5.0 Documentation