HP OpenVMS Systems Documentation |
OpenVMS Debugger Manual
C.15.4.1 SpecificationsThe following paragraphs describe where you can set breakpoints (or tracepoints) in specifications, using line numbers. The RPG II program cycle determines the order in which program lines are processed. When setting breakpoints or tracepoints, you can reference the line numbers that RPG II assigns to your program and appear in a listing file or in a debugger source display. The line numbers you specify in columns 1 through 5 of a specification are not used. The compiler assigns line numbers only to certain specifications at specific points in the logic cycle; therefore, you can specify a breakpoint or tracepoint at these points in the program:
C.15.4.2 LabelsYou can specify an RPG II label as a breakpoint or a tracepoint. The following RPG II labels, which correspond to specific points in the logic cycle, are provided in addition to user-defined tags. Note that these labels do not appear in the source code but are accessible from the debugger. The labels do appear in the machine code listing.
For example:
C.15.5 EXAMINE CommandThe EXAMINE command enables you to look at the contents of a variable, the current table entry, an array element, or the I/O buffer. To examine an array variable, use array syntax as in the following example:
Specifying a table name enables you to examine the entry retrieved from the last LOOKUP operation. To display the contents of the I/O buffer, specify the name of the input file, update file, or output file, followed by the string $BUF. For example, the following command displays the contents of the I/O buffer for the input file INPUT:
The following command displays the ASCII equivalent of the string STRING, which is 6 characters long:
To examine a variable which contains the at sign (@), use %NAME as follows:
To examine a nonexternal indicator, precede it with the string *IN. For example:
If an indicator is set off, 0 is displayed. If an indicator is set on, 1 is displayed. You cannot examine external indicators in this manner. To examine external indicators, you must first link the program with the /NOSYSSHR qualifier; then, use the CALL command, as in the following example which displays the value of U5:
C.15.6 DEPOSIT CommandNote the following points when using the DEPOSIT command:
C.15.7 EDIT Command
The EDIT command invokes the RPG II editor rather than the
Language-Sensitive Editor.
The following subtopics describe debugger support for SCAN.
Supported SCAN operators in language expressions include:
C.16.2 Constructs in Language and Address ExpressionsSupported constructs in language and address expressions for SCAN follow:
C.16.3 Predefined SymbolsSupported SCAN predefined symbols follow:
C.16.4 Data TypesSupported SCAN data types follow:
There is no specific support for the following data types: FILE C.16.5 NamesYou can use the names of the following SCAN constructs in debugger commands: procedures C.16.6 Controlling Execution
Note the following points about SCAN breakpoints, tracepoints, and
watchpoints.
You can set breakpoints and tracepoints on procedures, trigger macros, syntax macros, and labels, as well as line numbers. For example:
Conventional breakpoints and tracepoints are not especially convenient for monitoring SCAN's picture matching. Where do you set a breakpoint or tracepoint to observe the tokens built by your program? There is no statement in your program on which to set such a breakpoint. To solve this problem, VAX SCAN defines several events. By setting breakpoints or tracepoints on these events, you can observe the picture matching process. The following event keywords are defined for SCAN programs:
Use these keywords with the /EVENT qualifier of the following commands: (SET,CANCEL,ACTIVATE,DEACTIVATE) BREAK For example, the following command sets a breakpoint that triggers whenever a TOKEN is built:
Recognition of SCAN events is enabled automatically by the debugger if the main program is written in SCAN. If you are debugging a program written in another language that calls a SCAN routine, proceed as follows to set up the SCAN environment:
C.16.6.2 WatchpointsNote the following points about SCAN watchpoints:
C.16.7 Examining and DepositingThe following subtopics explain how to examine and deposit into the following SCAN variables: STRING C.16.7.1 STRING VariablesIf you deposit into a FIXED STRING variable, truncation will occur if the deposited string is longer than the size established by the declaration of that variable. If you deposit into a VARYING STRING variable, truncation will occur if the deposited string is longer than the maximum size established by the declaration of that variable. If you deposit into a DYNAMIC STRING variable, truncation will occur if the deposited string is longer than the current size of the variable. With FIXED and DYNAMIC STRING variables, if the deposited string is shorter than the current size of the variable, the unfilled portion of the variable will be blank padded to the right, with the new string left justified in the variable.
In the case of VARYING STRING variables, the current size of the
variable storage space will be adjusted to the size of the deposited
string.
Examining a FILL variable causes the contents of the specified variable to be displayed as a string, by default, and so may have little meaning. If the characteristics (or type) of the fill are known, the appropriate qualifier applied to the command will produce a more meaningful display. The following command example shows a fill x that is known to be a single floating number:
C.16.7.3 POINTER VariablesYou can examine a POINTER by name to find the address of the variable it points to. Use the operator that combines the minus sign and the greater than symbol (->) to examine the variable that is based on the POINTER. Consider these declarations and assignments:
The following command displays the value of the vstr component of x:
The following command displays the value of vstr based on the POINTER:
C.16.7.4 TREE and TREEPTR VariablesYou can examine the contents of the nodes in a tree using the following syntax:
You cannot deposit into a TREE variable. If you specify the name of a tree with the EXAMINE command, the debugger displays the contents of all nodes and leaves of the tree. For example:
You can specify an interior node by entering the subscript for that node. For example:
You can examine the leaf node in a tree by specifying all subscripts leading to the desired leaf. For example:
If you examine a TREEPTR variable, such as cityptr or wardptr, the debugger displays the address of that tree node. You examine what a TREEPTR variable is pointing to as follows:
C.16.7.5 RECORD and OVERLAY VariablesIf you specify a RECORD by name with the EXAMINE command, all components of the RECORD are presented. To examine individual components of the RECORD, specify the full name of each component. The general format is as follows:
You examine an OVERLAY in the same way. All components are again
presented; thus, if a four-byte region is a FILL(4), an INTEGER, and a
VARYING STRING(2), the four bytes will be displayed three different
ways.
The following subtopics describe debugger support for language UNKNOWN.
Supported operators in language expressions for language UNKNOWN follow:
|