summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/watchpoint.exp
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2010-11-09 18:23:52 +0000
committerPedro Alves <palves@redhat.com>2010-11-09 18:23:52 +0000
commita1442452ec3d5cf08e0baefb7aa8691b28ea9682 (patch)
tree926a4ec1c1bedff77e60d06d34b6d0e942f4e86c /gdb/testsuite/gdb.base/watchpoint.exp
parentf625ae503e5bf88c2f5d6b5a34316416f1fd0f9b (diff)
downloadbinutils-gdb-a1442452ec3d5cf08e0baefb7aa8691b28ea9682.tar.gz
gdb/
* breakpoint.c (watch_command_1): Get a pointer of the lazy version of the expression's value, even if reading the value from memory fails. When creating a -location watchpoint, get the value's address from the lazy value pointer. gdb/testsuite/ * gdb.base/watchpoint.exp: Test "watch -location" with an innacessible location.
Diffstat (limited to 'gdb/testsuite/gdb.base/watchpoint.exp')
-rw-r--r--gdb/testsuite/gdb.base/watchpoint.exp5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp
index 6721bdac534..0a829691e66 100644
--- a/gdb/testsuite/gdb.base/watchpoint.exp
+++ b/gdb/testsuite/gdb.base/watchpoint.exp
@@ -683,6 +683,11 @@ proc test_inaccessible_watchpoint {} {
"$watchpoint_msg \[0-9\]+: \\*\\(int \\*\\) 0"
delete_breakpoints
+ # The same, but using -location through an indirection.
+ gdb_test "watch -location *global_ptr" \
+ "$watchpoint_msg \[0-9\]+: \-location: \\*global_ptr"
+ delete_breakpoints
+
# This step requires two HW watchpoints. Since PPC Server only has
# a single one, it will use a SW watchpoint in this case.
if [istarget powerpc64-*] {