diff options
author | Sami Wagiaalla <swagiaal@redhat.com> | 2010-01-26 15:48:25 +0000 |
---|---|---|
committer | Sami Wagiaalla <swagiaal@redhat.com> | 2010-01-26 15:48:25 +0000 |
commit | 8540c487c665cd07366b3d1fa199af33fa5b3691 (patch) | |
tree | 021ae94532f49f553d59058b8a51fd6cfa36c809 /gdb/symtab.c | |
parent | 8f95b6e44955bda4aa330449215785aa987155bb (diff) | |
download | gdb-8540c487c665cd07366b3d1fa199af33fa5b3691.zip gdb-8540c487c665cd07366b3d1fa199af33fa5b3691.tar.gz gdb-8540c487c665cd07366b3d1fa199af33fa5b3691.tar.bz2 |
2010-01-26 Sami Wagiaalla <swagiaal@redhat.com>
* gdb.cp/namespace-using.exp: Add test for printing of namespaces
imported into file scope.
Marked test as xfail.
* gdb.cp/namespace-using.cc (marker5): New function.
* gdb.cp/shadow.exp: New test.
* gdb.cp/shadow.cc: New test program.
* gdb.cp/nsimport.exp: New test.
* gdb.cp/nsimport.cc: New test program.
2010-01-26 Sami Wagiaalla <swagiaal@redhat.com>
PR gdb/10929:
* dwarf2read.c (read_lexical_block_scope): Create blocks for
scopes which contain using directives even if they contain no
declarations.
* symtab.c (lookup_symbol_aux): Pass lowest level block to
la_lookup_symbol_nonlocal.
* cp-namespace.c (cp_lookup_symbol_nonlocal): call
cp_lookup_symbol_namespace.
(cp_lookup_symbol_namespace): Perform an import lookup at every
block level.
(cp_lookup_symbol_imports): New function.
(cp_lookup_symbol_in_namespace): New function.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 426326d..af4e501 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1367,13 +1367,14 @@ lookup_symbol_aux (const char *name, const char *linkage_name, && block != NULL) { struct symbol *sym = NULL; + const struct block *function_block = block; /* 'this' is only defined in the function's block, so find the enclosing function block. */ - for (; block && !BLOCK_FUNCTION (block); - block = BLOCK_SUPERBLOCK (block)); + for (; function_block && !BLOCK_FUNCTION (function_block); + function_block = BLOCK_SUPERBLOCK (function_block)); - if (block && !dict_empty (BLOCK_DICT (block))) - sym = lookup_block_symbol (block, langdef->la_name_of_this, + if (function_block && !dict_empty (BLOCK_DICT (function_block))) + sym = lookup_block_symbol (function_block, langdef->la_name_of_this, NULL, VAR_DOMAIN); if (sym) { |