C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
13-52
INSPECT
Usage Guidelines
For native C/C++, the INSPECT pragma must be entered on the compiler RUN
command line. For TNS C, the pragma can also be entered in the source file. In
the OSS environment, the pragma must be specified with the -W[no]inspect
flag of the c89 utility.
For TNS programs, the last INSPECT or NOINSPECT pragma in a translation unit
determines the default debugger for the entire translation unit.
The NOINSPECT attribute is set for native C and C++ programs only if an
executable object file (loadfile) is the output of the compilation. Process attributes
cannot be set for native linkfiles.
You can set or change the INSPECT object-file attribute to ON or OFF after
compilation using the Binder SET command (for TNS programs) or the eld, ld, or
nld utility (for native programs).
The INSPECT and SAVEABEND pragmas are interdependent:
°
If you specify NOINSPECT, the compiler automatically disables SAVEABEND (as
though you had explicitly specified NOSAVEABEND).
°
If you specify SAVEABEND, the compiler automatically enables the symbolic
debugger (as though you had explicitly specified INSPECT).
The SYMBOLS pragma affects the INSPECT pragmas: if you specify SYMBOLS, the
compiler automatically enables the symbolic debugger (as though you had
explicitly specified INSPECT).
To use all the features of a symbolic debugger, specify the SYMBOLS pragma so
that symbol information is included in the object file.
The debugging utility selected by INSPECT and NOINSPECT varies by system,
environment, and available subsystem:
°
For a TNS process:
NOINSPECT selects, in order of precedence:
INSPECT selects, in order of precedence:
°
For a native process:
NonStop S-series NonStop NS-series
DEBUG
Inspect
Native Inspect
NonStop S-series NonStop NS-series
Visual Inspect Visual Inspect
Inspect Inspect
DEBUG
Native Inspect