This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Ignore whitespace in demangled method names
- To: gdb-patches at sources dot redhat dot com
- Subject: [PATCH] Ignore whitespace in demangled method names
- From: Jim Blandy <jimb at zwingli dot cygnus dot com>
- Date: Tue, 20 Mar 2001 17:29:02 -0500 (EST)
I'm committing the following change. I'm a maintainer for linespec.c,
and the change to userdef.exp is non-controversial.
gdb/ChangeLog:
2001-03-20 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.)
gdb/testsuite/ChangeLog:
2001-03-20 Jim Blandy <jimb@redhat.com>
* gdb.c++/userdef.exp: Check that GDB tolerates whitespace in
unmangled operator names.
Index: gdb/linespec.c
===================================================================
RCS file: /cvs/src/src/gdb/linespec.c,v
retrieving revision 1.8
diff -c -r1.8 linespec.c
*** gdb/linespec.c 2001/03/20 16:17:22 1.8
--- gdb/linespec.c 2001/03/20 22:20:59
***************
*** 140,146 ****
method_name = dem_opname;
}
! if (STREQ (name, method_name))
/* Find all the overloaded methods with that name. */
for (field_counter = TYPE_FN_FIELDLIST_LENGTH (t, method_counter) - 1;
field_counter >= 0;
--- 140,146 ----
method_name = dem_opname;
}
! 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: gdb/testsuite/gdb.c++/userdef.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/userdef.exp,v
retrieving revision 1.2
diff -c -r1.2 userdef.exp
*** gdb/testsuite/gdb.c++/userdef.exp 2001/03/06 08:21:54 1.2
--- gdb/testsuite/gdb.c++/userdef.exp 2001/03/20 22:20:59
***************
*** 338,342 ****
--- 338,346 ----
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