Compaq AAQ2G1FTK Marine Radio User Manual


 
Programming Productivity Tools
C.4 OpenVMS Debugger (OpenVMS)
$ RUN TESTA
OpenVMS Alpha DEBUG Version V7.1-000
%DEBUG-I-INITIAL, Language: COBOL, Module: TESTA
%DEBUG-I-NOTATMAIN, type GO to get reach MAIN program
DBG>
3. Use the GO command to get to the start of the main program.
DBG> GO
break at routine TESTA
11: DISPLAY "ENTER WORD"
4. Set a breakpoint.
DBG> SET BREAK %LINE 43
5. Begin execution with the GO command. The debugger displays the execution
starting point, and the image continues until TESTA displays its prompt and
waits for a response.
DBG> GO
ENTER WORD:
6. Enter the word to be reversed. Execution continues until the image reaches
the breakpoint at line 43 of the contained program.
abc
break at TESTA\TESTB\%LINE 43
43: PERFORM LOOK-BACK VARYING SUB-1 FROM 20 BY -1
7. Set two breakpoints. When the debugger reaches line 50 of TESTB, it
executes the commands in parentheses, displays the two data items, and
resumes execution.
DBG> SET BREAK %LINE 47
DBG> SET BREAK %LINE 50 DO (EXAMINE HOLD-CHARS;EXAMINE SUB-1;GO)
8. Display the active breakpoints.
DBG> SHOW BREAK
breakpoint at TESTA\TESTB\%LINE 43
breakpoint at TESTA\TESTB\%LINE 47
breakpoint at TESTA\TESTB\%LINE 50
do (EXAMINE HOLD-CHARS;EXAMINE SUB-1;GO)
9. Use the TYPE command to display the source lines where you set
breakpoints.
DBG> TYPE 43:50
module TESTA
43: PERFORM LOOK-BACK VARYING SUB-1 FROM 20 BY -1
44: UNTIL TEMP_CHAR (SUB-1) NOT = SPACE.
45: MOVE SUB-1 TO CHARCT.
46: PERFORM MOVE-IT VARYING SUB-2 FROM 1 BY 1 UNTIL SUB-1 = 0.
47: MOVE HOLD-WORD TO TEMP-WORD.
48: MOVE-IT.
49: MOVE TEMP-CHAR (SUB-1) TO HOLD-CHAR (SUB-2).
50: SUBTRACT 1 FROM SUB-1.
10. Set a tracepoint at line 15 of TESTA.
DBG> SET TRACE %LINE 15
C10 Programming Productivity Tools