]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* gdb/linespec.c (find_methods): Whitespace differences aren't
authorJim Blandy <jimb@codesourcery.com>
Wed, 21 Mar 2001 20:51:16 +0000 (20:51 +0000)
committerJim Blandy <jimb@codesourcery.com>
Wed, 21 Mar 2001 20:51:16 +0000 (20:51 +0000)
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
gdb/linespec.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.c++/userdef.exp

index 72bbb5f4c914a3e590dcdfd6446ee6542707e28e..2d6aa24ba57753523be7a42e428aba22a111ca75 100644 (file)
@@ -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
index 6359bae4935a359fbee5fc611d19c3c638314876..f78751b943aa9a243ed6af8a2a3c0d02aa00b9f9 100644 (file)
@@ -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;
index 1c47de241c5aa02a0b6aa8a32f51ca7d153544a6..1e6896ec0c1ff205372e788ace16a6ac41721685 100644 (file)
@@ -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
index b49c4d89a52989be33446449b48ea8fdd38c35df..285ac06d6029201a5fac6ae82c19835c5197c5ef 100644 (file)
@@ -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