diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-07-01 20:27:59 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-07-01 20:27:59 +0000 |
commit | 418c7cf76163513b4e26ff980214fc68bab5e0d5 (patch) | |
tree | a365cb7ae97debd161ba72610b6c33e560c966ce /gdb/linespec.c | |
parent | 3d50dd94cb60adbb423659378bb9d758381959a2 (diff) | |
download | binutils-gdb-418c7cf76163513b4e26ff980214fc68bab5e0d5.tar.gz |
gdb/
* linespec.c (find_method): Accept the function type automatically only
if it was specified with parameter types.
gdb/testsuite/
* gdb.cp/paren-type.cc: New files.
* gdb.cp/paren-type.exp: New files.
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r-- | gdb/linespec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c index 1b5b6f1e85b..7740633ff2f 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -1697,7 +1697,10 @@ find_method (int funfirstline, struct linespec_result *canonical, i1 = find_methods (t, copy, SYMBOL_LANGUAGE (sym_class), sym_arr, file_symtab); - if (i1 == 1) + /* If we were given a specific overload instance in COPY, defer the field + acceptance till the strcmp_iw verification below, even if we found just + a single field with that name. */ + if (i1 == 1 && strchr (copy, '(') == NULL) { /* There is exactly one field with that name. */ sym = sym_arr[0]; |