Move declaration of overload_debug to header
[deliverable/binutils-gdb.git] / gdb / cp-namespace.c
index 574ae7e9334db44799cda2510827732b6d9f5cac..e15b77e701ddd832ad12b33a4ee6ef2203423a55 100644 (file)
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-
-/* Standard C++ includes.  */
-#include <string>
-
-/* Local non-gdb includes.  */
-#include "block.h"
-#include "buildsym.h"
-#include "command.h"
 #include "cp-support.h"
-#include "dictionary.h"
-#include "frame.h"
 #include "gdb_obstack.h"
+#include "symtab.h"
+#include "symfile.h"
+#include "block.h"
+#include "objfiles.h"
 #include "gdbtypes.h"
+#include "dictionary.h"
+#include "command.h"
+#include "frame.h"
+#include "buildsym.h"
 #include "language.h"
 #include "namespace.h"
-#include "objfiles.h"
-#include "symfile.h"
-#include "symtab.h"
+#include <string>
 
 static struct block_symbol
   cp_lookup_nested_symbol_1 (struct type *container_type,
@@ -282,8 +278,9 @@ cp_search_static_and_baseclasses (const char *name,
 
   /* If the scope is a function/method, then look up NESTED as a local
      static variable.  E.g., "print 'function()::static_var'".  */
-  if (TYPE_CODE (scope_type) == TYPE_CODE_FUNC
-      || TYPE_CODE (scope_type) == TYPE_CODE_METHOD)
+  if ((TYPE_CODE (scope_type) == TYPE_CODE_FUNC
+       || TYPE_CODE (scope_type) == TYPE_CODE_METHOD)
+      && domain == VAR_DOMAIN)
     return lookup_symbol (nested, SYMBOL_BLOCK_VALUE (scope_sym.symbol),
                          VAR_DOMAIN, NULL);
 
This page took 0.024017 seconds and 4 git commands to generate.