summaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-12-14 21:19:09 +0000
committerTom Tromey <tromey@redhat.com>2012-12-14 21:19:09 +0000
commitfc1dbcad0069dd1aa8492102fec1c50670246384 (patch)
treec6c3cdf9763f280a536072d65ace601bdd7b47ee /gdb/symtab.c
parent3186711e514556cb5ca492425664eb21e5a7ef52 (diff)
downloadgdb-fc1dbcad0069dd1aa8492102fec1c50670246384.tar.gz
PR c++/8888:
* symtab.c (lookup_symbol_aux): If constructor is found, consider returning the type instead. * c-exp.y (classify_name): Check STRUCT_DOMAIN if a constructor is found. testsuite * gdb.cp/member-name.exp: New file. * gdb.cp/member-name.cc: New file.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 97f114fc34f..50ba92a44fd 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1354,7 +1354,10 @@ lookup_symbol_aux (const char *name, const struct block *block,
langdef = language_def (language);
- if (is_a_field_of_this != NULL)
+ /* Don't do this check if we are searching for a struct. It will
+ not be found by check_field, but will be found by other
+ means. */
+ if (is_a_field_of_this != NULL && domain != STRUCT_DOMAIN)
{
struct symbol *sym = lookup_language_this (langdef, block);