diff options
author | Pedro Alves <palves@redhat.com> | 2010-11-09 18:23:52 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-11-09 18:23:52 +0000 |
commit | a1442452ec3d5cf08e0baefb7aa8691b28ea9682 (patch) | |
tree | 926a4ec1c1bedff77e60d06d34b6d0e942f4e86c /gdb/testsuite | |
parent | f625ae503e5bf88c2f5d6b5a34316416f1fd0f9b (diff) | |
download | gdb-a1442452ec3d5cf08e0baefb7aa8691b28ea9682.zip gdb-a1442452ec3d5cf08e0baefb7aa8691b28ea9682.tar.gz gdb-a1442452ec3d5cf08e0baefb7aa8691b28ea9682.tar.bz2 |
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')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/watchpoint.exp | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 1eacf9d..dae986b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-11-09 Pedro Alves <pedro@codesourcery.com> + + * gdb.base/watchpoint.exp: Test "watch -location" with an + innacessible location. + 2010-11-09 Edjunior Machado <emachado@br.ibm.com> Luis Machado <luisgpm@br.ibm.com> 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-*] { |