This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch][python] Add breakpoint support.
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: pmuldoon at redhat dot com (Phil Muldoon)
- Cc: brobecker at adacore dot com (Joel Brobecker), gdb-patches at sourceware dot org (gdb-patches ml), eliz at gnu dot org (Eli Zaretskii)
- Date: Fri, 11 Jun 2010 19:41:10 +0200 (CEST)
- Subject: Re: [patch][python] Add breakpoint support.
Phil Muldoon wrote:
> +gdb_py_test_silent_cmd "python wp1 = gdb.Breakpoint (\"result\", type=gdb.BP_WATCHPOINT, wp_class=gdb.WP_WRITE )" "Set watchpoint" 0
> +gdb_test "continue" ".*watchpoint.*result.*Old value = 0.*New value = 25.*main.*" "Test watchpoint write"
This fails on platforms with software watchpoints, because they use "Watchpoint"
instead of "Hardware watchpoint". Fixed by allowing "W" as well as "w" like
most other watchpoint related tests do.
Tested on spu-elf, committed to mainline.
Bye,
Ulrich
ChangeLog:
* gdb.python/py-breakpoint.exp: Handle software watchpoints as well.
Index: gdb/testsuite/gdb.python/py-breakpoint.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-breakpoint.exp,v
retrieving revision 1.1
diff -u -p -r1.1 py-breakpoint.exp
--- gdb/testsuite/gdb.python/py-breakpoint.exp 9 Apr 2010 09:41:43 -0000 1.1
+++ gdb/testsuite/gdb.python/py-breakpoint.exp 11 Jun 2010 16:43:07 -0000
@@ -136,7 +136,7 @@ if ![runto_main] then {
}
gdb_py_test_silent_cmd "python wp1 = gdb.Breakpoint (\"result\", type=gdb.BP_WATCHPOINT, wp_class=gdb.WP_WRITE )" "Set watchpoint" 0
-gdb_test "continue" ".*watchpoint.*result.*Old value = 0.*New value = 25.*main.*" "Test watchpoint write"
+gdb_test "continue" ".*\[Ww\]atchpoint.*result.*Old value = 0.*New value = 25.*main.*" "Test watchpoint write"
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com