diff options
author | Pedro Alves <palves@redhat.com> | 2009-01-01 22:02:03 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2009-01-01 22:02:03 +0000 |
commit | ccc57cf9e6782a19d8bccb1fdd0d02dd6ab98702 (patch) | |
tree | 8f5a92c1161105aae211fbdd06369748a2eee8e3 /gdb/testsuite | |
parent | 023b0f5cefb067d6338e9bfd2987e4ed54b8b379 (diff) | |
download | gdb-ccc57cf9e6782a19d8bccb1fdd0d02dd6ab98702.zip gdb-ccc57cf9e6782a19d8bccb1fdd0d02dd6ab98702.tar.gz gdb-ccc57cf9e6782a19d8bccb1fdd0d02dd6ab98702.tar.bz2 |
2009-01-01 Pedro Alves <pedro@codesourcery.com>
PR breakpoints/9681:
* exceptions.h (enum errors): New error type, MEMORY_ERROR.
* corefile.c (memory_error): Rewrite to throw a MEMORY_ERROR.
* breakpoint.c (fetch_watchpoint_value): Ignore MEMORY_ERRORs, but
retrow all other exceptions.
2009-01-01 Pedro Alves <pedro@codesourcery.com>
PR breakpoints/9681:
* gdb.base/watchpoint.exp: Add regression test.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/watchpoint.exp | 12 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 7244a1d..3b9c4b4 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-01-01 Pedro Alves <pedro@codesourcery.com> + + PR breakpoints/9681: + * gdb.base/watchpoint.exp: Add regression test. + 2008-12-31 Pedro Alves <pedro@codesourcery.com> * gdb.threads/attach-into-signal.exp: Don't use diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp index 9935ef8..6557cba 100644 --- a/gdb/testsuite/gdb.base/watchpoint.exp +++ b/gdb/testsuite/gdb.base/watchpoint.exp @@ -649,6 +649,18 @@ proc test_inaccessible_watchpoint {} { # valid) memory. if [runto func4] then { + # Make sure we only allow memory access errors. + set msg "watchpoint refused to insert on nonexistent struct member" + gdb_test_multiple "watch struct1.nosuchmember" $msg { + -re ".*atchpoint \[0-9\]+: struct1.nosuchmember.*$gdb_prompt $" { + # PR breakpoints/9681 + fail $msg + } + -re "There is no member named nosuchmember\\..*$gdb_prompt $" { + pass $msg + } + } + gdb_test "watch *global_ptr" ".*atchpoint \[0-9\]+: \\*global_ptr" gdb_test "next" ".*global_ptr = buf.*" gdb_test_multiple "next" "next over ptr init" { |