aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2001-03-21 20:51:16 +0000
committerJim Blandy <jimb@codesourcery.com>2001-03-21 20:51:16 +0000
commit13b57657099c839e1508400a4a73b222d4da2c25 (patch)
tree4ada6d1d1f5ce0db3b38fac0b7208c8e2d06636f
parent1dffcc66386145e0eda2bb842a9bccb7eca33981 (diff)
downloadgdb-13b57657099c839e1508400a4a73b222d4da2c25.zip
gdb-13b57657099c839e1508400a4a73b222d4da2c25.tar.gz
gdb-13b57657099c839e1508400a4a73b222d4da2c25.tar.bz2
* 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.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/linespec.c2
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.c++/userdef.exp4
4 files changed, 16 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 72bbb5f..2d6aa24 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2001-03-21 Jim Blandy <jimb@redhat.com>
+
+ * 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 <ac131313@redhat.com>
* gdbarch.sh: Allow a non- multi-arch target to override a
diff --git a/gdb/linespec.c b/gdb/linespec.c
index 6359bae..f78751b 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 1c47de2..1e6896e 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2001-03-21 Jim Blandy <jimb@redhat.com>
+
+ * gdb.c++/userdef.exp: Check that GDB tolerates whitespace in
+ unmangled operator names.
+
2001-03-20 Jim Blandy <jimb@redhat.com>
* 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 b49c4d8..285ac06 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