User interface to Code Debug TSO for C
This section describes how to interact with Code Debug TSO in general. The screen formats, PF key assignments, command processing, and attention key processing are discussed.
Attention key processing
When you press the attention key while Code Debug or your application is executing, the message
is displayed. If you enter HELP, a screen containing information similar to C Program in the Source Screen and C Program Encountering an Abend is displayed. Enter the option you want to perform.
Attention Key Processing Options
PAUSE TO DYNAMICALLY INVOKE THE PAUSE COMMAND
EXIT TO TERMINATE THE TEST SESSION
LOG TO DISPLAY THE LOG PRIOR TO TERMINATION
PSW TO DISPLAY THE CURRENT PSW ADDRESS
GPREGS TO DISPLAY THE CURRENT GENERAL PURPOSE REGISTERS
STORAGE <address> TO DISPLAY STORAGE AT THE SPECIFIED ADDRESS
WHERE TO DISPLAY THE CURRENT MODULE AND OFFSET
WHERE <address> TO DISPLAY THE MODULE AND OFFSET OF <address>
WHERE <module> TO DISPLAY THE ADDRESS OF THE SPECIFIED MODULE
GO TO RESUME TEST EXECUTION (or PRESS ENTER)
If pressing the Attention key interrupts an IMS Fast Path test and you then enter the EXIT command, Code Debug IMS will detach your IMS region and an S33E system abend will be reported as you return to the starting test panel. Message XPD1202 records the abend in the Code Debug session log.
When you press the attention key while Code Debug is waiting for input (e.g., stopped at a breakpoint), the message
is displayed. If you press the attention key again, the message
is displayed. Pressing attention again will take you to the READY prompt.
Command processing
In interactive mode, the results of command execution are immediately visible on the source display.
Code Debug TSO commands can be entered in three ways:
- Type the command in the primary command area and press Enter. Command stacking, delimited by a semicolon (;), is allowed.
The primary command area can be extended up to three lines by using the SET CMDSIZE command. The previous primary command can be recalled by entering a question mark (?). - Press the PF key that was assigned to the desired command. See the Default Program Function (PF) Keys table for a list of the PF key assignments.
- Type over the 6-digit compiler-generated line number with a valid line command and press Enter.
Code Debug TSO records the line command in the session log in the same manner as the primary command.
Lowercase conversion
By default, commands entered in lowercase are converted to uppercase. To override the default, use the SET CAPS OFF command. Also, to display lowercase data, use the SET LOWCASE ASIS command.
PF Keys
The default settings for the 24 Code Debug PF keys are listed in the following table. These values are valid during the Code Debug TSO session. ISPF PF keys are not affected. The ISPF KEYS command or the SET PFn command can be used to override the defaults.
Default Program Function (PF) Keys
PF Key | Default Setting | Description of Function |
---|---|---|
PF1/PF13 | HELP | Elaborates an Code Debug TSO message and invokes the context-sensitive tutorial facility. |
PF2 | PEEK CSR | Displays the contents of the data name defined by the current cursor position. The cursor must be in the Source window under a valid data name. |
PF14 | FIND CSR | Finds the character string located under the cursor position. |
PF3/PF15 | END | Returns you to the previous menu if you are in the Log, Help, Browse, or Show functions. |
PF4/PF16 | EXIT | Ends the current Code Debug TSO session. |
PF5 | FIND | Repeats the action of the previous FIND command. |
PF17 | FIND IND | Scrolls the source display to successive levels of indirect references related to a previously entered FIND INDIRECT command. |
PF6/PF18 | LOCATE * | Scrolls the source display to the current location where execution was suspended. |
PF7/PF19 | UP | Scrolls the source or data in the Keep window up, or toward the top of the file. |
PF8/PF20 | DOWN | Scrolls the source or data in the Keep window down, or toward the bottom of the file. |
PF9/PF21 | GO 1 | Executes the next logical instruction in your program, then pauses. |
PF10 | LEFT | Scrolls the source display to the left. |
PF11 | RIGHT | Scrolls the source display to the right. |
PF12/PF24 | GO | Starts or resumes execution of your program. |
PF22 | DLEFT | Scrolls data in an Automatic Keep, Keep, or Peek window to the left. |
PF23 | DRIGHT | Scrolls data in an Automatic Keep, Keep, or Peek window to the right. |
Code Debug screens
Code Debug uses screens that are like ISPF/PDF, making the Code Debug menus and utility screens self-explanatory. The Source, Log, Show, and Memory screens have a similar format. The following figure displays a C program in the Code Debug Source screen, and C Program Encountering an Abend displays a C program on the same screen encountering an abend.
C Program in the Source Screen
COMMAND ===> SCROLL ===> CSR
PROGRAM: TRIMAINC MODULE: TRIMAINC COMP DATE: 07/10/2000 COMP TIME:09:44:27
** END **
------ ----------------------------------------- Before TRIMAINC/AMODE 31 <>
000086
=====> B int main(void)
000088 {
000089
000090 struct tblentry tritable??(4??), *tblptr;
000090 struct tblentry tritable[4], *tblptr;
000091
000092 char eof='n';
000093
000094 tblptr=tritable;
000095 if (init(tblptr) != 0)
000096 {
000097 printf( "Initialization failure !!!\n" );
000098 exit(EXIT_FAILURE);
000098 exit(8);
The screen areas are described as:
Title
(line 1): Identifies the screen name: Source, Log, Show, Memory, and so forth.
Command area
(line 2): Primary command line, which can be increased to three lines using the SET CMDSIZE command.
Scroll amount
(line 2): Indicates the current scroll amount. You can type over the current value with one of the following values:
1 to 9999 | Scrolls by the number of lines or columns. |
CSR or C | Scrolls based on the current position of the cursor. |
DATA or D | Scrolls by one line or column less than PAGE. |
HALF or H | Scrolls by a half page. |
PAGE or P | Scrolls by one page. |
Program
(line 3): Identifies the CSECT currently displayed. This is an unprotected field and can be typed over with another program name.
Module
(line 3): Displays the load module name.
Compile date
(line 3): Displays the compile date.
Compile time
(line 3): Displays the compile time.
C Program Encountering an Abend
COMMAND ===> SCROLL ===> CSR
S0C1 ABEND ENCOUNTERED, USE "AA SNAP" COMMAND FOR ADDITIONAL INFORMATION
000092 eof > n
000090 tblptr > 00194298 POINTER
** END **
------ ----------------------------- S0C1 Abend at TRIMAINC:103/AMODE 31 <>
000102 {
=====> eof = analyze_next_rec(tblptr);
000104 }
000105 if (eof == 'E')
000106 {
000107 exit(EXIT_FAILURE);
000107 exit(8);
000108 }
000109 fclose( stream );
000110 trirptc(tblptr);
000111 A }
000112
000113
000114 /* */
000115 /* */
Message area
(See the figure above, line 3): Displays short or informational messages. When a message is issued, it overlays the program information in line 3. Press Enter to flush the message and display the program information. Additional information can be accessed by pressing PF1 (HELP).
Keep Window
(lines 4-8): Automatically displays data referenced in the current statement; i.e., the statement where the execution arrow is located when the breakpoint takes effect. Explicitly kept data is also displayed. Explicitly kept items are denoted by a K in column 9 of the window.
The data in the window can be scrolled by moving the cursor to the Keep window and using the PF7 (UP) and PF8 (DOWN) keys to scroll vertically and the PF22 (DRIGHT) and PF23 (DLEFT) keys to scroll horizontally. You can also control the size of the window and, for automatic keeps, the placement of the automatically kept items. See to Displaying Test Session Settings for additional information.
The SET AUTOKEEP ON/OFF command toggles the effect of the Automatic Keep function.
Execution status
(line 9): Identifies the current execution point in your program. The <> shown at the end of this line indicates that the source can be scrolled to the left and/or right.
The execution status line may also display one or more of the following:
- Whether execution is halted before or after the specified line
- Program name
- Abend code (C Program Encountering an Abend)
- 24, 31, or 64 bit addressing mode.
Source area
The source area begins on line 10 and displays 68 to 70 bytes of the source code on the screen at a time. The source can be scrolled vertically using the PF7 (UP) and PF8 (DOWN) keys and horizontally using the PF10 (RIGHT) and PF11 (LEFT) keys. When an Automatic Keep window is visible, the data in the window can also be scrolled vertically using the PF7 and PF8 keys and horizontally using the PF22 and PF23 keys.
The After, Before, Onetime, Peek, and Skip indicators are displayed on the left side of the source in column 9. A 7-digit counter set by the COUNT command is displayed on the right side beginning at column 74.