From 2a704f045c78a8897c56c0ad9ab3687deab7202e Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sat, 2 Jul 2011 20:13:12 +0000 Subject: [PATCH] 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. --- gdb/ChangeLog | 5 +++++ gdb/linespec.c | 5 ++++- gdb/testsuite/ChangeLog | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) 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. -- 2.47.2