aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-namespace.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-05-03 20:10:22 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-05-03 20:10:22 +0000
commit1ac77ea1639caba28809b36835f0c97c29a32378 (patch)
tree2776cd7e088fe13f3475d381aa546a7a738949ac /gdb/cp-namespace.c
parent7c54a108808870f501cd0a8eadf67693324c374c (diff)
downloadgdb-1ac77ea1639caba28809b36835f0c97c29a32378.zip
gdb-1ac77ea1639caba28809b36835f0c97c29a32378.tar.gz
gdb-1ac77ea1639caba28809b36835f0c97c29a32378.tar.bz2
gdb/
* cp-namespace.c (cp_lookup_symbol_imports): Support ALIAS for the CURRENT->DECLARATION case. * cp-support.h (struct using_direct): Provide extended comment.
Diffstat (limited to 'gdb/cp-namespace.c')
-rw-r--r--gdb/cp-namespace.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index c050d1a..e042463 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -355,12 +355,14 @@ cp_lookup_symbol_imports (const char *scope,
searched_cleanup = make_cleanup (reset_directive_searched, current);
/* If there is an import of a single declaration, compare the imported
- declaration with the sought out name. If there is a match pass
- current->import_src as NAMESPACE to direct the search towards the
- imported namespace. */
- if (current->declaration && strcmp (name, current->declaration) == 0)
+ declaration (after optional renaming by its alias) with the sought
+ out name. If there is a match pass current->import_src as NAMESPACE
+ to direct the search towards the imported namespace. */
+ if (current->declaration
+ && strcmp (name, current->alias ? current->alias
+ : current->declaration) == 0)
sym = cp_lookup_symbol_in_namespace (current->import_src,
- name,
+ current->declaration,
block,
domain);