From 5c71744046ab6fb78f798564ad9d151a1a8cda5e Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Sat, 11 May 2002 22:46:19 +0000 Subject: [PATCH] 2002-05-11 Daniel Jacobowitz From Peter Schauer : * linespec.c (find_methods): Handle GCC 3.x template constructors. --- gdb/ChangeLog | 5 +++++ gdb/linespec.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e2aad0db84..042ece37f1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-05-11 Daniel Jacobowitz + + From Peter Schauer : + * linespec.c (find_methods): Handle GCC 3.x template constructors. + 2002-05-11 Jason Thorpe * nbsd-tdep.c: Fix comment. diff --git a/gdb/linespec.c b/gdb/linespec.c index f707234603..8e51021fc4 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -130,6 +130,7 @@ find_methods (struct type *t, char *name, struct symbol **sym_arr) (struct symtab **) NULL))) { int method_counter; + int name_len = strlen (name); CHECK_TYPEDEF (t); @@ -202,7 +203,9 @@ find_methods (struct type *t, char *name, struct symbol **sym_arr) */ } } - else if (strcmp_iw (class_name, name) == 0) + else if (strncmp (class_name, name, name_len) == 0 + && (class_name[name_len] == '\0' + || class_name[name_len] == '<')) { /* For GCC 3.x and stabs, constructors and destructors have names like __base_ctor and __complete_dtor. Check the physname for now -- 2.34.1