+2011-07-26 Pedro Alves <pedro@codesourcery.com>
+
+ * breakpoint.c (works_in_software_mode_watchpoint): Also return
+ true for software watchpoints.
+
2011-07-26 Joel Brobecker <brobecker@adacore.com>
GDB 7.3 released.
static int
works_in_software_mode_watchpoint (const struct breakpoint *b)
{
- return b->type == bp_hardware_watchpoint;
+ /* Read and access watchpoints only work with hardware support. */
+ return b->type == bp_watchpoint || b->type == bp_hardware_watchpoint;
}
static enum print_stop_action
+2011-07-26 Pedro Alves <pedro@codesourcery.com>
+
+ * gdb.base/watchpoint.exp
+ (test_disable_enable_software_watchpoint): New procedure.
+ (top level): Run it.
+
2011-07-26 Ulrich Weigand <ulrich.weigand@linaro.org>
* gdb.python/py-mi.exp: Avoid '+' in filenames. Call C version of
gdb_test_no_output "delete \$bpnum" "delete watchpoint `7 + count'"
}
+proc test_disable_enable_software_watchpoint {} {
+ # This is regression test for a bug that caused `enable' to fail
+ # for software watchpoints.
+
+ # Watch something not memory to force a software watchpoint.
+ gdb_test {watch $pc} ".*atchpoint \[0-9\]+: .pc"
+
+ gdb_test_no_output "disable \$bpnum" "disable watchpoint `\$pc'"
+ gdb_test_no_output "enable \$bpnum" "reenable watchpoint `\$pc'"
+
+ gdb_test "info watchpoint \$bpnum" \
+ ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+.pc.*" \
+ "watchpoint `\$pc' is enabled"
+
+ gdb_test_no_output "delete \$bpnum" "delete watchpoint `\$pc'"
+}
+
proc test_watch_location {} {
gdb_breakpoint [gdb_get_line_number "func5 breakpoint here"]
gdb_continue_to_breakpoint "func5 breakpoint here"
test_constant_watchpoint
+ test_disable_enable_software_watchpoint
+
test_watch_location
}