summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/watchpoint.exp
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@broadcom.com>2013-10-29 16:33:42 +0000
committerAndrew Burgess <aburgess@broadcom.com>2013-10-31 12:52:35 +0000
commit638aa5a1bac0c3782b6c0a40a03743507c57741e (patch)
tree7dbd4728fcbe6856725d45b85772151c7ec3dde4 /gdb/testsuite/gdb.base/watchpoint.exp
parentdd0845d708ab82f931fd7b800b4d218842ed635f (diff)
Extra error message from update_watchpoint
https://sourceware.org/ml/gdb-patches/2013-10/msg00551.html gdb/ChangeLog * breakpoint.c (update_watchpoint): Update error message and add an additional error message. gdb/testsuite/ChangeLog * gdb.base/watchpoint.exp (test_no_hw_watchpoints): Add additional tests and update expected error message. (test_watch_register_location): New tests. (do_tests): Call test_watch_register_location. * gdb.base/watchpoints.exp: Update expected error message.
Diffstat (limited to 'gdb/testsuite/gdb.base/watchpoint.exp')
-rw-r--r--gdb/testsuite/gdb.base/watchpoint.exp24
1 files changed, 23 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp
index e0d4f81087..9576a9eadc 100644
--- a/gdb/testsuite/gdb.base/watchpoint.exp
+++ b/gdb/testsuite/gdb.base/watchpoint.exp
@@ -825,8 +825,12 @@ proc test_no_hw_watchpoints {} {
# refrains from using them.
#
gdb_test "rwatch ival3" \
- "Expression cannot be implemented with read/access watchpoint..*" \
+ "Can't set read/access watchpoint when hardware watchpoints are disabled." \
"rwatch disallowed when can-set-hw-watchpoints cleared"
+ gdb_test "awatch ival3" \
+ "Can't set read/access watchpoint when hardware watchpoints are disabled." \
+ "awatch disallowed when can-set-hw-watchpoints cleared"
+
# Re-enable hardware watchpoints if necessary.
if ![target_info exists gdb,no_hardware_watchpoints] {
@@ -879,6 +883,22 @@ proc test_watchpoint_in_big_blob {} {
gdb_test_no_output "delete \$bpnum" "delete watch buf"
}
+proc test_watch_register_location {} {
+ global no_hw
+
+ if {!$no_hw && ![target_info exists gdb,no_hardware_watchpoints]} {
+ # Non-memory read/access watchpoints are not supported, they would
+ # require software read/access watchpoint support (which is not
+ # currently available).
+ gdb_test "rwatch \$pc" \
+ "Expression cannot be implemented with read/access watchpoint..*" \
+ "rwatch disallowed for register based expression"
+ gdb_test "awatch \$pc" \
+ "Expression cannot be implemented with read/access watchpoint..*" \
+ "awatch disallowed for register based expression"
+ }
+}
+
# Start with a fresh gdb.
set prev_timeout $timeout
@@ -940,6 +960,8 @@ proc do_tests {} {
test_wide_location_1
test_wide_location_2
+
+ test_watch_register_location
}
# On targets that can do hardware watchpoints, run the tests twice: