Accelerator Manual (G06.27+, H06.04+, J06.03+)

Debugging Accelerated Programs
Accelerator Manual527303-003
7-3
ProcDebug
statement boundaries and the ability to modify memory safely. TNS machine-level
restrictions include the fact that breakpoints are restricted to memoryexact points and
register modification is restricted to register-exact points.
ProcDebug
ProcDebug, the default optimization level, results in optimizations that might blur
statement boundaries. Blurred statement boundaries result in some statements
becoming inaccessible for debugging purposes. Statements are grouped together into
a single indivisible unit. Single-stepping executes the entire group of statements in one
step. Breakpoints can be placed on the beginning of the first statement of the group,
but not on inner statements. The following characteristics are unique to programs
accelerated with the ProcDebug option:
Memory-exact points exist at the beginning of most statements and at some
locations within statements.
Register-exact points only occur as required by the Accelerator. They often follow
procedure calls within statements.
Code optimized with the ProcDebug option produces more efficient accelerated
code than code optimized with the StmtDebug option.
StmtDebug
At this level of optimization, the RISC code generated from individual TNS instructions
is not necessarily grouped in a contiguous block. Instructions might be rearranged to fill
load delay slots and branch delay slots. However, the RISC code for different
statements is not interleaved. The following characteristics are unique to programs
accelerated with the StmtDebug option:
Register-exact points occur at the beginning of most statements and at some
locations within statements. As a result, the state of memory is consistent at the
beginning of most statements, as is the view of the TNS machine state.
Code optimized with the StmtDebug option is not as fast or as efficient as code
generated using ProcDebug.
A Strategy for Debugging
In general, debug the TNS object code version of your complete program before using
the Accelerator. Then accelerate a version of the program containing an Inspect
symbols region, using the default debugging option, ProcDebug, and perform final
testing.
If your accelerated object code behaves differently than the TNS object code:
Try running the program on a TNS system and a TNS/R system without using the
Accelerator.