From: Jan Kratochvil Date: Sat, 2 Jul 2011 20:13:12 +0000 (+0000) Subject: commit c92bdb809c286916b2ee6c267dad6a58a5706a62 X-Git-Tag: gdb_7_3-2011-07-26-release~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2a704f045c78a8897c56c0ad9ab3687deab7202e;p=thirdparty%2Fbinutils-gdb.git commit c92bdb809c286916b2ee6c267dad6a58a5706a62 Author: Jan Kratochvil Date: Fri Jul 1 20:27:58 2011 +0000 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index aeaadcf6931..8cdb092f5a1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-07-02 Jan Kratochvil + + * linespec.c (find_method): Accept the function type automatically only + if it was specified with parameter types. + 2011-07-02 Jan Kratochvil Stop on first linespec terminator instead of eating what we can. diff --git a/gdb/linespec.c b/gdb/linespec.c index fe3208d420a..972fb47e0c3 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -1696,7 +1696,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]; diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 48b69eafffa..9f523e8586b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-07-02 Jan Kratochvil + + * gdb.cp/paren-type.cc: New files. + * gdb.cp/paren-type.exp: New files. + 2011-07-02 Jan Kratochvil Stop on first linespec terminator instead of eating what we can.