dbxenv scope_look_aside on
or use the “double backquote” prefix:
stop in ``func4 func4 may be static and not in scope
If the dbx environment variable scope_look_aside is set to on, dbx looks for:
Static variables defined in other files if not found in current scope. Files from libraries in /usr/lib are not searched.
C++ member functions without class qualification.
Instantiations of C++ inline member functions in other files if a member function is not instantiated in current file.
The which command tells you which symbol dbx would choose. In the case of ambiguous names, the overload display list indicates that dbx has not yet determined which occurrence of two or more names it would use. dbx lists the possibilities and waits for you to choose one.
For more information, see func Command.