diff options
author | Tom Tromey <tromey@redhat.com> | 2013-08-02 16:41:08 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-08-02 16:41:08 +0000 |
commit | 3a1115a0cc0a0a98555ba99df76ad9bcfee08759 (patch) | |
tree | 7bd5d53c3fa5d8723edfa7193d43c3ec43f9d932 /gdb/testsuite/gdb.base/watchpoint.c | |
parent | 58b19776a6713e101fb71fab79ea70fa9af19e3a (diff) | |
download | gdb-3a1115a0cc0a0a98555ba99df76ad9bcfee08759.zip gdb-3a1115a0cc0a0a98555ba99df76ad9bcfee08759.tar.gz gdb-3a1115a0cc0a0a98555ba99df76ad9bcfee08759.tar.bz2 |
fix PR symtab/15719
This patch fixes PR symtab/15719.
The bug is that "watch -location" crashes on a certain expression.
The problem is that fetch_subexp_value is catching an exception.
For ordinary watchpoints this is ok; but for location watchpoints,
it is better for the exception to propagate.
Built and regtested on x86-64 Fedora 18.
New test case included.
PR symtab/15719:
* breakpoint.c (update_watchpoint, watchpoint_check)
(watch_command_1): Update.
* eval.c (fetch_subexp_value): Add "preserve_errors"
parameter.
* ppc-linux-nat.c (check_condition): Update.
* value.h (fetch_subexp_value): Update.
* gdb.base/watchpoint.c (struct foo5): New.
(nullptr): New global.
* gdb.base/watchpoint.exp (test_watch_location): Add test.
Diffstat (limited to 'gdb/testsuite/gdb.base/watchpoint.c')
-rw-r--r-- | gdb/testsuite/gdb.base/watchpoint.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/watchpoint.c b/gdb/testsuite/gdb.base/watchpoint.c index e887f99..92fb3b1 100644 --- a/gdb/testsuite/gdb.base/watchpoint.c +++ b/gdb/testsuite/gdb.base/watchpoint.c @@ -54,6 +54,13 @@ struct foo4 }; struct foo4 foo4; +struct foo5 +{ + struct { int x; } *p; +}; + +struct foo5 *nullptr; + void marker1 () { } |