aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-07-26 19:39:59 +0000
committerPedro Alves <palves@redhat.com>2011-07-26 19:39:59 +0000
commitefa80663c6860c65971ea1d3e6284c2676074d10 (patch)
tree7140b58d4636a9ec58c40ae048f27e8b62d0148b /gdb/testsuite
parentffdd6afc609db5cc7f86bdb2169ff7ad2eb3875f (diff)
downloadbinutils-efa80663c6860c65971ea1d3e6284c2676074d10.zip
binutils-efa80663c6860c65971ea1d3e6284c2676074d10.tar.gz
binutils-efa80663c6860c65971ea1d3e6284c2676074d10.tar.bz2
2011-07-26 Pedro Alves <pedro@codesourcery.com>
gdb/ * breakpoint.c (works_in_software_mode_watchpoint): Also return true for software watchpoints. gdb/testsuite/ * gdb.base/watchpoint.exp (test_disable_enable_software_watchpoint): New procedure. (top level): Run it.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.base/watchpoint.exp19
2 files changed, 25 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 1eeeeb2..8011247 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp
index 1d8c5bc..331b181 100644
--- a/gdb/testsuite/gdb.base/watchpoint.exp
+++ b/gdb/testsuite/gdb.base/watchpoint.exp
@@ -630,6 +630,23 @@ proc test_constant_watchpoint {} {
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"
@@ -903,6 +920,8 @@ if [initialize] then {
test_constant_watchpoint
+ test_disable_enable_software_watchpoint
+
test_watch_location
}