aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-namespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cp-namespace.c')
-rw-r--r--gdb/cp-namespace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index 89c1bbd..9d86fe2 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -287,10 +287,10 @@ cp_search_static_and_baseclasses (const char *name,
struct type *scope_type = scope_sym.symbol->type ();
/* If the scope is a function/method, then look up NESTED as a local
- static variable. E.g., "print 'function()::static_var'". */
+ static variable or type. E.g., "print 'function()::static_var'". */
if ((scope_type->code () == TYPE_CODE_FUNC
|| scope_type->code () == TYPE_CODE_METHOD)
- && (domain & SEARCH_VAR_DOMAIN) != 0)
+ && (domain & (SEARCH_VAR_DOMAIN | SEARCH_TYPE_DOMAIN)) != 0)
return lookup_symbol (nested, scope_sym.symbol->value_block (),
domain, NULL);