1.DBG> CANCEL SCOPE
DBG> SHOW SCOPE
scope:
* 0 [ = EIGHTQUEENS\TRYCOL\REMOVEQUEEN ],
1 [ = EIGHTQUEENS\TRYCOL ],
2 [ = EIGHTQUEENS\TRYCOL 1 ],
3 [ = EIGHTQUEENS\TRYCOL 2 ],
4 [ = EIGHTQUEENS\TRYCOL 3 ],
5 [ = EIGHTQUEENS\TRYCOL 4 ],
6 [ = EIGHTQUEENS ]
DBG> SET SCOPE/CURRENT 2
DBG> SHOW SCOPE
scope:
0 [ = EIGHTQUEENS\TRYCOL\REMOVEQUEEN ],
1 [ = EIGHTQUEENS\TRYCOL ],
* 2 [ = EIGHTQUEENS\TRYCOL 1 ],
3 [ = EIGHTQUEENS\TRYCOL 2 ],
4 [ = EIGHTQUEENS\TRYCOL 3 ],
5 [ = EIGHTQUEENS\TRYCOL 4 ],
6 [ = EIGHTQUEENS ]
DBG>
The CANCEL SCOPE command restores the default scope search
list, which is displayed by the (first) SHOW SCOPE command. In
this example, execution is suspended at routine REMOVEQUEEN,
after several recursive calls to routine TRYCOL. The asterisk
(*) indicates that the scope search list starts with scope 0,
the scope of the routine in which execution is suspended.
The SET SCOPE/CURRENT command resets the start of the scope
search list to scope 2. Scope 2 is the scope of the caller of
the routine in which execution is suspended. The asterisk in
the output of the (second) SHOW SCOPE command indicates that
the scope search list now starts with scope 2.
2.DBG> SET SCOPE 0,STACKS\R2,SCREEN_IO,\
DBG> SHOW SCOPE
scope:
0, [= TEST ],
STACKS\R2,
SCREEN_IO,
\
DBG>
In this example, the SET SCOPE command directs the debugger
to look for symbols without pathname prefixes according to
the following scope search list. First the debugger looks in
the PC scope (denoted by 0, which is in module TEST). If the
debugger cannot find a specified symbol in the PC scope, it
then looks in routine R2 of module STACKS; if necessary, it
then looks in module SCREEN_IO, and then finally in the global
symbol table (denoted by the global scope (\)). The SHOW SCOPE
command identifies the current scope search list for symbol
lookup. No asterisk is shown in the SHOW SCOPE display unless
the default scope search list is in effect or you have entered
a SET SCOPE/CURRENT command.