From 13b57657099c839e1508400a4a73b222d4da2c25 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Wed, 21 Mar 2001 20:51:16 +0000 Subject: [PATCH] * gdb/linespec.c (find_methods): Whitespace differences aren't significant in *un*mangled method names. Use strcmp_iw to compare them, not STREQ. (Fix from Daniel Berlin.) * gdb/testsuite/gdb.c++/userdef.exp: Check that GDB tolerates whitespace in unmangled operator names. --- gdb/ChangeLog | 6 ++++++ gdb/linespec.c | 2 +- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.c++/userdef.exp | 4 ++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 72bbb5f4c91..2d6aa24ba57 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2001-03-21 Jim Blandy + + * linespec.c (find_methods): Whitespace differences aren't + significant in *un*mangled method names. Use strcmp_iw to compare + them, not STREQ. (Fix from Daniel Berlin.) + 2001-03-21 Andrew Cagney * gdbarch.sh: Allow a non- multi-arch target to override a diff --git a/gdb/linespec.c b/gdb/linespec.c index 6359bae4935..f78751b943a 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -140,7 +140,7 @@ find_methods (struct type *t, char *name, struct symbol **sym_arr) method_name = dem_opname; } - if (STREQ (name, method_name)) + if (strcmp_iw (name, method_name) == 0) /* Find all the overloaded methods with that name. */ for (field_counter = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1; field_counter >= 0; diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 1c47de241c5..1e6896ec0c1 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2001-03-21 Jim Blandy + + * gdb.c++/userdef.exp: Check that GDB tolerates whitespace in + unmangled operator names. + 2001-03-20 Jim Blandy * gdb.threads/linux-dp.exp: Recognize an additional message diff --git a/gdb/testsuite/gdb.c++/userdef.exp b/gdb/testsuite/gdb.c++/userdef.exp index b49c4d89a52..285ac06d602 100644 --- a/gdb/testsuite/gdb.c++/userdef.exp +++ b/gdb/testsuite/gdb.c++/userdef.exp @@ -338,5 +338,9 @@ gdb_expect { timeout { fail "(timeout) print value of two=one" } } +# Check that GDB tolerates whitespace in operator names. +gdb_test "break A1::'operator+'" ".*Breakpoint $decimal at.*" +gdb_test "break A1::'operator +'" ".*Breakpoint $decimal at.*" + gdb_exit return 0 -- 2.30.2