[GDB 6.8] Problem using watchpoints with compound objects
Daniel Jacobowitz
drow@false.org
Tue Mar 3 20:33:00 GMT 2009
On Tue, Mar 03, 2009 at 05:38:56PM +0000, Antony KING wrote:
> After applying the patch for problem 1 I then encountered a second
> problem where a watchpoint is being erroneously dismissed as being
> unchanged. I believe this problem is due to the following test in
> watchpoint_check():
>
> if (!value_equal (b->val, new_val))
>
> This test is only comparing the address of the object and not its
> contents. I think the test should be revised to the following:
What are you setting a watchpoint on? value_equal is an
implementation of the equality operator in the CLI. If you have a
pointer, it will only compare the addresses, but for a struct object
it should compare contents.
--
Daniel Jacobowitz
CodeSourcery
More information about the Gdb
mailing list