From a1442452ec3d5cf08e0baefb7aa8691b28ea9682 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 9 Nov 2010 18:23:52 +0000 Subject: 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. --- gdb/testsuite/gdb.base/watchpoint.exp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/testsuite/gdb.base/watchpoint.exp') diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp index 6721bda..0a82969 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-*] { -- cgit v1.1