SET SCOPE

Set the current visibility of symbols and types.

Syntax

SET SCOPE /UP [=levels]

SET SCOPE /DOWN [=levels]

SET SCOPE /CURRENT

SET SCOPE expression

Parameters

/UP[=levels]

The scope may be moved backwards with this qualifier along the current call stack to show the dynamic call structure of the program. The value of levels defaults to 1.

/DOWN[=levels]

The scope may be moved forward with this qualifier along the current call stack to show the dynamic call structure of the program. The value of levels defaults to 1.

/CURRENT

The scope is set to the location where the program currently halts.

expression

The scope can be set to a static position in the user's program. Valid expressions are:

module\procedure

procedure

Description

The SET SCOPE command sets the scope of the debugger. The term scope means the current visibility of symbols and types. The Source window and the Assembler window are updated to show the corresponding source lines and machine statements respectively.

The location fields of the program are enclosed in brackets (“[ ]”) to signal that the address shown is not the current program address.

If the scope to a procedure is set without using /UP or /DOWN, its local stack and register variables cannot be evaluated because they are not addressable.

Note

The qualifiers /UP and /DOWN can work correctly only if the list of nested procedure calls contains procedures with normal function prolog/epilog sequences. These sequences maintain a linked list on the user stack, which is used by the debugger to walk up and down. If some procedures do not place themselves into this list, or do not execute their prolog codes, they are not visible to the debugger. The latter case happens if a breakpoint is set on a procedure name and the debugger stops there and the command SHOW CALLS is used immediately. In this case the last procedure is missing in the list of nested procedures.

Example

SET SCOPE /UP=2
SET SCOPE /DOWN
SET SCOPE main\function7
SET SCOPE procedure
SET SCOPE /CURRENT

See Also

For more complete information about compiler optimizations, see our Optimization Notice.