ContentsIndexPreviousNext

2.1.9 Debugging Options

All the information obtained when you use the Debugging Options listed below is coded and stored in the the COBOL object file, and the runtime retrieves, decodes, and sends it to the workbench when requested.

-Ga This is a shortcut for turning ON all the debugging options.

-Gd This option includes the source code in the compiled object file. See also Chapter 3, "Debugger and Utilities," for additional details about this option.

-Gl This option includes line numbers. It does not include source code in the compiled object. It includes only a mapping between addresses and line numbers of some source files. This enables the workbench to find and display the source of the COBOL program, indicating the line on which the debugger is currently stopped.

-Gs This option includes extra symbol information. It does not include source code in the compiled object. This information is accessible only from the workbench. The extra symbol information can be used by the workbench to get all the "children" and "siblings" of any particular data item. It allows the workbench to traverse the symbol table of the COBOL program and to have a tree-type control for viewing group data items.

-Gy This option includes minimal symbol information. It does not include source code in the compiled object. Instead, minimal information about names and locations is stored in the object. Using this switch, you can accept and display variables from within the debugger or from the workbench.


Note that to debug something via the workbench you need only the "-Gl" and "-Gs" options. This combination allows the workbench to display the correct line of the correct source file when the debugger is stopped at a breakpoint and to display any data items that you want to see. It also does not include the source code in the compiled object, so the object can be safely distributed without fear of unauthorized access to source code.
The section on the runtime debugger (in Chapter 3) describes the differences between symbolic debugging and source-level debugging.