From 1ac77ea1639caba28809b36835f0c97c29a32378 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 3 May 2010 20:10:22 +0000 Subject: gdb/ * cp-namespace.c (cp_lookup_symbol_imports): Support ALIAS for the CURRENT->DECLARATION case. * cp-support.h (struct using_direct): Provide extended comment. --- gdb/cp-namespace.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'gdb/cp-namespace.c') 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); -- cgit v1.1