diff options
author | Pedro Alves <palves@redhat.com> | 2011-12-13 16:05:24 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2011-12-13 16:05:24 +0000 |
commit | fabde4854cc349f0269c073508450789874ef156 (patch) | |
tree | 473cf7603e71a7ca14df1941b6697b9dcdb1df22 /gdb/testsuite/gdb.base/watchpoint.c | |
parent | d9071b0c4242fe1180340d52c6b6207e794675ae (diff) | |
download | gdb-fabde4854cc349f0269c073508450789874ef156.zip gdb-fabde4854cc349f0269c073508450789874ef156.tar.gz gdb-fabde4854cc349f0269c073508450789874ef156.tar.bz2 |
2011-12-13 Pedro Alves <pedro@codesourcery.com>
* gdb.base/watchpoint.c (struct foo2, foo2, struct foo4, foo4)
(func6, func7): New.
(main): Call func6 and func7.
* gdb.base/watchpoint.exp (test_wide_location_1)
(test_wide_location_2): New.
(top level): Re-enable hardware watchpoints if necessary. Call
test_wide_location_1 and test_wide_location_2.
Diffstat (limited to 'gdb/testsuite/gdb.base/watchpoint.c')
-rw-r--r-- | gdb/testsuite/gdb.base/watchpoint.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/watchpoint.c b/gdb/testsuite/gdb.base/watchpoint.c index 9ef9253..c4d8a69 100644 --- a/gdb/testsuite/gdb.base/watchpoint.c +++ b/gdb/testsuite/gdb.base/watchpoint.c @@ -42,6 +42,18 @@ int doread = 0; char *global_ptr; char **global_ptr_ptr; +struct foo2 +{ + int val[2]; +}; +struct foo2 foo2; + +struct foo4 +{ + int val[4]; +}; +struct foo4 foo4; + void marker1 () { } @@ -137,6 +149,22 @@ func5 () val = 27; } +void +func6 (void) +{ + /* func6 breakpoint here */ + foo2.val[1] = 0; + foo2.val[1] = 11; +} + +void +func7 (void) +{ + /* func7 breakpoint here */ + foo4.val[3] = 0; + foo4.val[3] = 33; +} + int main () { #ifdef usestubs @@ -216,5 +244,9 @@ int main () func5 (); + func6 (); + + func7 (); + return 0; } |