Inspect Manual
Using Inspect With TNS/R Native Programs
Inspect Manual—429164-006
17-2
TNS/R Native Compilers and Linkers
deleted statements and the inability to modify memory safely.) Traditionally, optimized
code is difficult to debug because instructions can be reordered enough to blur the
correspondence of instructions to source code.
Debugging a TNS/R native program is similar to debugging the RISC portions of an
accelerated program, but you should be aware of a few differences.
In TNS/R native mode, local variables are sometimes cached in registers.
Attempting to modify a local variable or use it for setting a memory access
breakpoint, for example, can have unexpected results.
In highly optimized TNS/R native object code, parameter values are sometimes
cached in registers, making their exact location unpredictable.
In TNS/R native mode, unlike accelerated mode, there are no TNS instructions
corresponding to the RISC instructions.
Inspect allows you to display register-based variables in any stack frame.
However, Inspect only allows modification of register-based variables if the current
scope is active, that is, the top of the stack.
Inspect creates and reads save files from TNS/R native processes. This includes
saving stack frames, Global data and heap areas, main stack, and SRL instance
data. Inspect also includes the trap or signal number in the save file if the
application ABENDed due to a trap.
To display TNS/R frames, use the TRACE REGISTERS command. For TNS/R
frames, Inspect displays the PC register in the normal Inspect form as a scope
name and offset. Inspect also displays the virtual frame pointer (VFP) for that
frame.
To set a breakpoint in TNS/R native code, you can either specify a scope name or
a machine-level code address.
TNS/R Native Compilers and Linkers
TNS/R systems support the following native compilers (manuals are listed also):
C/C++ C/C++ Programmer’s Guide
COBOL85 COBOL85 for NonStop Systems Manual
pTAL pTAL Reference Manual
These compilers produce only RISC instructions.
On TNS/R systems, Binder is replaced by the native link editor (nld) and the native
object file tool (noft). Additionally, for position-independent code (PIC) programs on
TNS/R, you must use the ld linker in place of nld, and also use the PIC run-time loader,
rld. For more information, see the nld and noft Manual and the ld and rld Reference
Manual.