* 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.
This commit is contained in:
Daniel Jacobowitz
2010-09-04 15:30:09 +00:00
parent 33d62d6487
commit 8464be7681
4 changed files with 42 additions and 7 deletions

View File

@@ -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
{