diff options
author | Thiago Jung Bauermann <bauerman@br.ibm.com> | 2009-12-30 17:33:35 +0000 |
---|---|---|
committer | Thiago Jung Bauermann <bauerman@br.ibm.com> | 2009-12-30 17:33:35 +0000 |
commit | 218d2fc6506ec89b6ee03af89b4f23199f9fc8e9 (patch) | |
tree | 81f3c02f2cc8344f66870a074c9c5fdde8713ccb /gdb/testsuite | |
parent | 236f1d4defb2070d3e43ce406604da7659860b38 (diff) | |
download | gdb-218d2fc6506ec89b6ee03af89b4f23199f9fc8e9.zip gdb-218d2fc6506ec89b6ee03af89b4f23199f9fc8e9.tar.gz gdb-218d2fc6506ec89b6ee03af89b4f23199f9fc8e9.tar.bz2 |
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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/watchpoint.c | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/watchpoint.exp | 9 |
3 files changed, 19 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 13da3d3..33aee08 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2009-12-30 Thiago Jung Bauermann <bauerman@br.ibm.com> + + * 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. + 2009-12-29 Stan Shebs <stan@codesourcery.com> * gdb.trace/actions.exp: Test default-collect. diff --git a/gdb/testsuite/gdb.base/watchpoint.c b/gdb/testsuite/gdb.base/watchpoint.c index bba97fa..9275d88 100644 --- a/gdb/testsuite/gdb.base/watchpoint.c +++ b/gdb/testsuite/gdb.base/watchpoint.c @@ -30,7 +30,7 @@ int ival2 = -1; int ival3 = -1; int ival4 = -1; int ival5 = -1; -char buf[10]; +char buf[30] = "testtesttesttesttesttesttestte"; struct foo { int val; @@ -95,6 +95,7 @@ func3 () x = 1; /* second x assignment */ y = 1; y = 2; + buf[26] = 3; } int diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp index 9fee73b..ff11a4f 100644 --- a/gdb/testsuite/gdb.base/watchpoint.exp +++ b/gdb/testsuite/gdb.base/watchpoint.exp @@ -678,6 +678,13 @@ proc test_inaccessible_watchpoint {} { } } +proc test_watchpoint_in_big_blob {} { + global gdb_prompt + + gdb_test "watch buf" ".*atchpoint \[0-9\]+: buf" + gdb_test "cont" "Continuing.*atchpoint \[0-9\]+: buf\r\n\r\nOld value = .*testte\".*" "watchpoint on buf hit" +} + # Start with a fresh gdb. gdb_exit @@ -842,6 +849,8 @@ if [initialize] then { } test_watchpoint_and_breakpoint + + test_watchpoint_in_big_blob } # Restore old timeout |