Debugging a Program With dbx

Scope Resolution Search Path

When you issue a debugging command with a symbol target name, the search order is as follows:

  1. dbx first searches within the scope of the current function. If the program is stopped in a nested block, dbx searches within that block, then in the scope of all enclosing blocks.

  2. For C++ only: class members of the current function`s class and its base class.

  3. The immediately enclosing "compilation unit," generally, the file containing the current function.

  4. The LoadObject scope.

  5. The global scope.

  6. If none of the above searches are successful, dbx assumes you are referencing a private, or file static, variable or function. 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 a variable, it reports an error.