Inspect Manual

Using Inspect With Accelerated Programs on TNS/R
Systems
Inspect Manual429164-006
16-4
Accelerated Program Debugging Concepts
Execution can only switch between TNS and TNS/R instructions at points where all
values have been saved from the TNS/R system registers into memory and the
representation of the TNS machine state is accurate. The accelerator defines such
points, referred to as register-exact points, where necessary for this purpose. Register-
exact points are most commonly found following procedure and subprocedure calls.
Transitions do not affect program accuracy or debugging unless you attempt to perform
an operation, such as setting a TNS/R register, that depends on TNS/R instructions
being executed.
Accelerated Program Debugging Concepts
The debugging option used with the accelerator slightly affects source-level debugging
and significantly affects TNS machine-level debugging. Most source-level debugging
capabilities are preserved. Source-level debugging restrictions include the possibility of
deleted statements and the ability to modify memory safely. TNS machine level
restrictions include the fact that breakpoints are restricted to memory-exact points and
register modification is restricted to register-exact points.
Accelerated programs run faster than TNS programs, in part because the accelerated
code is optimized. Traditionally, optimized code is difficult to debug because
instructions can be reordered enough to blur the correspondence of instructions to
source code. With the default accelerator option, ProcDebug, the accelerator optimizes
over as large an area as possible to gain the maximum program performance.
The three key differences between debugging non-accelerated programs and
accelerated programs are:
Code breakpoint restrictions
When debugging accelerated programs, code breakpoints are restricted to a
subset of TNS instruction addresses. These points, referred to as memory-exact
points, are the locations at which the state of displayed memory is consistent.
Modify restrictions
Memory-exact points, defined at the beginning of most source statements, are
defined such that all writes to memory for preceding source statements have
occurred. It might be the case, however, that values used by subsequent
statements are already loaded in system registers. As a result, modify operations,
which modify the copy in memory, might have no effect on program behavior.
Register-exact points, a subset of memory-exact points, are defined so that no
optimizations cross these points. Memory can be modified reliably at register-
exact points. These are also points at which a program may transfer between
executing TNS and TNS/R instructions.
Note. When accelerated programs begin execution, they begin executing TNS
instructions and immediately transfer to executing TNS/R instructions.