This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] PR c++/18141


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=13ce92227425999aa2666f4d55286193df7d09ca

commit 13ce92227425999aa2666f4d55286193df7d09ca
Author: Doug Evans <dje@google.com>
Date:   Mon Mar 30 16:41:05 2015 -0700

    PR c++/18141
    
    gdb/ChangeLog:
    
    	PR c++/18141
    	* cp-namespace.c (cp_search_static_and_baseclasses): Always look for
    	klass in VAR_DOMAIN.

Diff:
---
 gdb/ChangeLog      | 6 ++++++
 gdb/cp-namespace.c | 7 +++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 651383f..6c4bbe5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-30  Doug Evans  <dje@google.com>
+
+	PR c++/18141
+	* cp-namespace.c (cp_search_static_and_baseclasses): Always look for
+	klass in VAR_DOMAIN.
+
 2015-03-30  Gary Benson <gbenson@redhat.com>
 
 	* remote.c (remote_mourn_1): Remove function.  Update all callers
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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]