[RFA] Fix verification of changed values for big values.
Thiago Jung Bauermann
bauerman@br.ibm.com
Wed Dec 23 23:43:00 GMT 2009
Hi,
This is a resubmission of a patch I posted long ago:
http://sourceware.org/ml/gdb-patches/2009-05/msg00670.html
It's good on its own, but is also important for ranged watchpoints in our
ppc476 support patches. Here's my original explanation:
Right now, GDB calls value_equal when comparing the old and new values
of a watchpoint. IMO this is not correct, since that function will call
coerce_array and effectively just compare the addresses of arrays being
watched.
This patch introduces a new value comparison function which works in the
mentioned case, and a testcase which fails without the patch and passes
with it.
Tromey had approved it here:
http://sourceware.org/ml/gdb-patches/2009-06/msg00076.html
But I don't know if approvals expire or not, so...
This version addresses Tromey's comments.
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center
gdb/
* valarith.c (value_equal_contents): New function.
* value.h (value_equal_contents): Declare.
* breakpoint.c (watchpoint_check): Use value_equal_contents
instead of value_equal.
gdb/testsuite/
* gdb.base/watchpoint.exp (test_watchpoint_in_big_blob): New function.
(top level): Call test_watchpoint_in_big_blob.
* gdb.base/watchpoint.c (buf): Change size to value too big for hardware
watchpoints.
(func3): Write to buf.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: equal-contents.diff
Type: text/x-patch
Size: 4137 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20091223/2395d5e2/attachment.bin>
More information about the Gdb-patches
mailing list