diff options
author | Tom Tromey <tromey@redhat.com> | 2013-08-02 16:41:07 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-08-02 16:41:07 +0000 |
commit | f481f474696ffbf874d1f9c97371e7bfcb6a47b3 (patch) | |
tree | 2b009aefc203d7eaec220481c94f50174eae235b /gdb/ppc-linux-nat.c | |
parent | cb81ffd4f1c415b1f7f6ebce3a11d2b6777a02f2 (diff) | |
download | gdb-f481f474696ffbf874d1f9c97371e7bfcb6a47b3.tar.gz |
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/ppc-linux-nat.c')
-rw-r--r-- | gdb/ppc-linux-nat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index 1f3f080f942..c518f77d3a8 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -1952,7 +1952,7 @@ check_condition (CORE_ADDR watch_addr, struct expression *cond, if (cond->elts[0].opcode != BINOP_EQUAL) return 0; - fetch_subexp_value (cond, &pc, &left_val, NULL, &left_chain); + fetch_subexp_value (cond, &pc, &left_val, NULL, &left_chain, 0); num_accesses_left = num_memory_accesses (left_chain); if (left_val == NULL || num_accesses_left < 0) @@ -1962,7 +1962,7 @@ check_condition (CORE_ADDR watch_addr, struct expression *cond, return 0; } - fetch_subexp_value (cond, &pc, &right_val, NULL, &right_chain); + fetch_subexp_value (cond, &pc, &right_val, NULL, &right_chain, 0); num_accesses_right = num_memory_accesses (right_chain); if (right_val == NULL || num_accesses_right < 0) |