forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -728,7 +728,8 @@ extern struct value *evaluate_subexpression_type (struct expression *exp,
|
||||
|
||||
extern void fetch_subexp_value (struct expression *exp, int *pc,
|
||||
struct value **valp, struct value **resultp,
|
||||
struct value **val_chain);
|
||||
struct value **val_chain,
|
||||
int preserve_errors);
|
||||
|
||||
extern char *extract_field_op (struct expression *exp, int *subexp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user