When you issue a debugging command that contains an expression, the symbols in the expression are looked up in the following order. dbx resolves the symbols as the compiler would at the current visiting scope.
Within the scope of the current function using the current visiting scope (see Visiting Scope). If the program is stopped in a nested block, dbx searches within that block, then in the scope of all enclosing blocks.
For C++ only: class members of the current function's class and its base class.
For C++ only: the current name space.
The parameters of the current function.
The immediately enclosing module, generally, the file containing the current function.
Symbols that were made private to this shared library or executable. These symbols can be created using linker scoping.
Global symbols for the main program, and then for shared libraries.
If none of the above searches are successful, dbx assumes you are referencing a private, or file static, variable or function in another file. dbx optionally searches for a file static symbol in every compilation unit depending on the value of the dbxenv setting scope_look_aside.
dbx uses whichever occurrence of the symbol it first finds along this search path. If dbx cannot find the symbol, it reports an error.