aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2010-09-04 15:30:09 +0000
committerDaniel Jacobowitz <drow@false.org>2010-09-04 15:30:09 +0000
commit8464be768129e057bc92e27de51317b99717da8f (patch)
treefce4d58eba457aad863192a92fa72c782db80755 /gdb/breakpoint.c
parent33d62d6487b115456a0bfe0255dddbc6e4bed9d7 (diff)
downloadgdb-8464be768129e057bc92e27de51317b99717da8f.zip
gdb-8464be768129e057bc92e27de51317b99717da8f.tar.gz
gdb-8464be768129e057bc92e27de51317b99717da8f.tar.bz2
* breakpoint.c (can_use_hardware_watchpoint): Handle the first
value specially. testsuite/ * gdb.base/watchpoint.exp: Call test_inaccessible_watchpoint before disabling hardware watchpoints. (test_inaccessible_watchpoint): Check that hardware watchpoints are used. Test for watchpoints on a constant address.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 10aee95..1d3f7fc 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -8327,10 +8327,12 @@ can_use_hardware_watchpoint (struct value *v)
{
if (VALUE_LVAL (v) == lval_memory)
{
- if (value_lazy (v))
- /* A lazy memory lvalue is one that GDB never needed to fetch;
- we either just used its address (e.g., `a' in `a.b') or
- we never needed it at all (e.g., `a' in `a,b'). */
+ if (v != head && value_lazy (v))
+ /* A lazy memory lvalue in the chain is one that GDB never
+ needed to fetch; we either just used its address (e.g.,
+ `a' in `a.b') or we never needed it at all (e.g., `a'
+ in `a,b'). This doesn't apply to HEAD; if that is
+ lazy then it was not readable, but watch it anyway. */
;
else
{