Inspect Manual
Inspect Concepts
Inspect Manual—429164-006
2-13
Activation of Scope Units
According to the general syntax, the scope path for the identifiers A, B, and C is:
#main.deep
The scope path for the identifiers X, Y, and Z is:
#main.deep.deeper.deepest
Refer to the language-specific portions of this manual for language-specific syntax.
The Current Scope Path
If you do not specify a scope path when you refer to an identifier, Inspect assumes that
the identifier is in the current scope path. You can set the current scope path using the
SCOPE command. In addition, Inspect sets the current scope path whenever a debug
event occurs. In this case, Inspect sets the current scope path to the scope path
defining the scope unit in which the debug event occurred.
Using the code fragment from the previous subsection, assume that a breakpoint is set
at the entry of the DEEPEST scope unit. When that breakpoint halts as a result of that
breakpoint, Inspect sets the current scope path to:
#main.deep.deeper.deepest
To look at the value of the identifier X, you could then enter:
Alternatively, you can use the current scope path and simply enter:
Inspect will automatically qualify the identifier X using the current scope path.
Activation of Scope Units
Scope paths qualify and define specific scope units, but they are not related to the
execution of a scope unit. Execution is controlled by the control flow in a program.
When a program firsts begins, only the main scope unit is active. When that scope unit
calls some other scope unit, the other scope unit becomes active as well. This second
scope unit remains active until it returns control to the scope unit that called it.
When a scope unit is activated, space for its local variables is allocated. When it is
deactivated (that is, when it returns control to its caller), its local variable space is
deallocated. As a result, data breakpoints referring to local variables become useless
when their scope unit is deactivated.
When debugging, you can examine the list of active scope units using the TRACE
command. This command displays the call history from the scope unit currently being
-SAMPLE-DISPLAY #main.deep.deeper.deepest.x
-SAMPLE-DISPLAY x