This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [GDB 6.8] Problem using watchpoints with compound objects


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]