aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-namespace.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2015-03-30 16:41:05 -0700
committerDoug Evans <dje@google.com>2015-03-30 16:41:05 -0700
commit13ce92227425999aa2666f4d55286193df7d09ca (patch)
tree1da690ae4898434c6bad2f1c4624f65562e70909 /gdb/cp-namespace.c
parent6b0ad2ebf6024419c84f35552f4eb55aa0b23195 (diff)
downloadgdb-13ce92227425999aa2666f4d55286193df7d09ca.zip
gdb-13ce92227425999aa2666f4d55286193df7d09ca.tar.gz
gdb-13ce92227425999aa2666f4d55286193df7d09ca.tar.bz2
PR c++/18141
gdb/ChangeLog: PR c++/18141 * cp-namespace.c (cp_search_static_and_baseclasses): Always look for klass in VAR_DOMAIN.
Diffstat (limited to 'gdb/cp-namespace.c')
-rw-r--r--gdb/cp-namespace.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index 4a00cb6..0feeb35 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -355,8 +355,11 @@ cp_search_static_and_baseclasses (const char *name,
make_cleanup (xfree, nested);
/* Lookup a class named KLASS. If none is found, there is nothing
- more that can be done. */
- klass_sym = lookup_global_symbol (klass, block, domain);
+ more that can be done. KLASS could be a namespace, so always look
+ in VAR_DOMAIN. This works for classes too because of
+ symbol_matches_domain (which should be replaced with something else,
+ but it's what we have today). */
+ klass_sym = lookup_global_symbol (klass, block, VAR_DOMAIN);
if (klass_sym == NULL)
{
do_cleanups (cleanup);