Inspect Manual
Using Inspect With C++
Inspect Manual—429164-006
9-3
Usage Considerations
#line-number [ (source-file) ]
specifies the statement beginning at a given line number in the source file.
( ) qualifies the line number by the source file containing it. Use this option only
if the source code for the given function is in more than one file.
FROM module
specifies the module in which the function containing the code location is defined.
In HP C++, the module name is the file name of the module’s base source file (the
file specified as input to the HP C++ compiler). The FROM clause can be used to
restrict the number of ambiguous functions. Inspect will continue to prompt you to
resolve the ambiguity if there is more than one matching function. In C++, the
FROM clause can still be used to specify non-static overloaded functions.
offset
specifies an offset from the code location defined by the preceding options. A
positive offset denotes code following the specified code location; a negative offset
denotes code preceding the specified code location. The amount to offset is
specified as a given number of units. If you omit the unit specifier, Inspect selects
a default unit of STATEMENT for C++ programs. Inspect code units correspond to
C++ code units as follows:
INSTRUCTION Specifies a machine-code instruction in compiled C++ program.
STATEMENT Specifies a C++ statement.
VERB Specifies a C++ statement, as does STATEMENT.
Usage Considerations
Low-level code locations
Low-level Inspect recognizes function names, but does not use any other symbol
information. In low-level Inspect, therefore, you can only use code locations of the
form:
#scope-path [ code-offset ]
This form represents an offset from the code base of a function. Also, the code
unit of code-offset in low-level Inspect is always INSTRUCTION.
High-level code locations
High-level Inspect recognizes function names as does low-level Inspect, but it also
uses the symbol information created when you compile a function with the
SYMBOLS pragma. Therefore, code locations in high-level Inspect can include
label identifiers or line numbers.