aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-12-14 21:19:11 +0000
committerTom Tromey <tromey@redhat.com>2012-12-14 21:19:11 +0000
commit6592e36f33270932ce9f9d19fd6488b3754c1b95 (patch)
tree8ad41b5bae9054ee31a7ce0404c5ab74a0d46577 /gdb/symtab.c
parent7d27a96df4e297e7329e0e3856c6d6e346478c80 (diff)
downloadgdb-6592e36f33270932ce9f9d19fd6488b3754c1b95.zip
gdb-6592e36f33270932ce9f9d19fd6488b3754c1b95.tar.gz
gdb-6592e36f33270932ce9f9d19fd6488b3754c1b95.tar.bz2
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 97f114f..50ba92a 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);