To use the online debugger with a DC/UCF VS-COBOL program, perform the steps shown below. The steps may vary depending on the release level of the compiler; however, the basic methodology is the same. The following examples correspond to the sample listings shown in Preliminary Computations.
Note: To obtain the complete Assembler source code, substituteCLIST with PMAP as described in Preliminary Computations.
ENTER NEXT TASK CODE: debug DEBUG>
DEBUG> debug testprog DEBUG TESTPROG DEBUG> DEBUGGING INITIATED FOR TESTPROG VERSION 1 DEBUG>
DEBUG> at $ + @1d4c AT $ + @1D4C AT> $ + @1D4C ADDED DEBUG>
After all breakpoints have been set, leave the setup phase of the debugger session by issuing the EXIT command:
DEBUG> exit
Note: You will also be able to set new breakpoints whenever you are stopped at a breakpoint during the runtime phase.
ENTER NEXT TASK CODE: deptmod
When a breakpoint is encountered at runtime, the debugger assumes control and identifies the address, program, and the debugger expression that was used to establish the breakpoint:
AT OFFSET @1D4C IN TESTPROG EXPRESSION $+@1D4C DEBUG>
Note: Registers are sometimes used for multiple purposes within a COBOL program. When a breakpoint is set using the CLIST value, the equivalent assembler code to load the BL value into R6 may not have occurred. If you are not certain a register contains the appropriate value, use the method for listing LINKAGE SECTION variables described below. That method is also always valid for WORKING STORAGE variables.
list %:r6 + @260 32 LIST %:R6 + @260 32 00140270 E3C5E2E3 D7D9D6C7 F0F0F0F0 3D3D4F06 *TESTPROG0000..|.* 00140280 C4C5D7C1 D9E3D4C5 D5E34040 40404040 *DEPARTMENT *
To examine LINKAGE SECTION variables, perform the following steps:
DEBUG>
list %:rR13 + @208
LIST %:R13 + @208
(BLL1) (BLL2) (BLL3) (BLL4)
001499E0 00000000 00000000 00000000 00149AC8 *...............H*
Each BLL is 4-bytes long. Note the absolute address located in the BLL for the field that you want to display.
DEBUG> LIST @149ac8 9 00149AC8 F1F1F1F1 C4C5D7E3 00 *1111DEPT *
DEBUG> LIST @149ac8+@4 4 00149AC8 C4C5D7E3 *DEPT *
DEBUG> resume
DEBUG> quit QUIT QUIT DEBUGGER ENTER NEXT TASK CODE:
|
Copyright © 2013 CA.
All rights reserved.
|
|