aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorMichael Chastain <mec@google.com>2001-01-30 02:49:36 +0000
committerMichael Chastain <mec@google.com>2001-01-30 02:49:36 +0000
commitc9049fc98f3281433941016016242a57577f5f10 (patch)
treecf9505c614b37ac0e20be75013c03fd9d7403a97 /gdb/symtab.c
parent9add9c04bdf2c48bec05ba8eb2883c395e08b5ca (diff)
downloadgdb-c9049fc98f3281433941016016242a57577f5f10.zip
gdb-c9049fc98f3281433941016016242a57577f5f10.tar.gz
gdb-c9049fc98f3281433941016016242a57577f5f10.tar.bz2
2001-01-29 Michael Chastain <chastain@redhat.com>
* symtab.c (block_lookup_symbol): Use 'namespace' parameter in symbol comparisons in binary search.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 832fb01..6b35d57 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1259,8 +1259,11 @@ lookup_block_symbol (register const struct block *block, const char *name,
while (bot < top)
{
sym = BLOCK_SYM (block, bot);
- if (SYMBOL_MATCHES_NAME (sym, name))
- return sym;
+ if (SYMBOL_NAMESPACE (sym) == namespace &&
+ SYMBOL_MATCHES_NAME (sym, name))
+ {
+ return sym;
+ }
bot++;
}
}