Previous Topic: How Does Symbolic Support Work?

Next Topic: Supported Compilers and Assemblers

Symbolic Support for Optimized Applications

CA Application Quality and Testing Tools supports programs that have been optimized, either by the COBOL compiler's OPTIMIZE option or by CA Optimizer or CA Optimizer/II. However, debugging and post mortem analysis of these programs can sometimes result in unexpected behavior.

Note: The PL/I compilers are optimizing compilers.

Often as part of the optimization process, a compiler will relocate individual instructions, statements, or even entire paragraphs so that the optimized program will run more efficiently. This means that some or all of the instructions generated for a given statement may be moved to another statement, or that some or all of the statements in a paragraph may be moved to another paragraph. When this type of optimization occurs, the resulting object program and corresponding listing may not accurately represent the relationship between the source statements and their generated object code, or even between a paragraph label and the statements contained within the paragraph. As a result, there may be times when the breakpoint intercept does not occur, or when the wrong sequence of statements appears to be executed while single-stepping, or when the abending object code does not correspond to the correct source statement. There may also be times when the debugger appears to highlight the wrong statement at a breakpoint intercept or the dump analysis identifies the wrong statement as the abending source statement.

These unexpected displays do not indicate that a program is being executed incorrectly or that an abend is being incorrectly analyzed. They simply indicate that the debugger or dump analyzer sometimes cannot accurately identify exactly which object code corresponds to which source statement, or which statement is contained within which paragraph.

The CA Application Quality and Testing Tools products use the information in the compiler-generated procedure map or offset report to establish the program offset for each statement and label in the program. During execution or abend processing, the debugger or abend analyzer recognizes the start of the new statement or label by matching the program offset of the currently executing instruction with the PROTSYM information obtained from the compiler listing. Therefore, the accuracy with which the debugger or abend analyzer can represent a breakpoint or other intercept or the abending statement is only as good as the information in the compiler listing.

Inaccuracies may include, but will not be limited to:

Additionally, application abends may result from the use of the SKIP, GO stmt# or CS stmt# commands because the optimized object code may have register requirements that do not support changes to the flow of control. These commands should be avoided when debugging an optimized program.

For the best debugging results, avoid using optimization whenever possible in your testing environment. Production applications may be compiled with optimization, and debugging these applications as they exist without recompiling is supported. However, be aware that you may experience some of the inaccuracies listed previously under these circumstances.