aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-03-29 21:49:39 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-03-29 21:49:39 +0000
commit0eaaa46a44378fe755b5ce17b6b5cfa75a22287d (patch)
tree6afb8be70388fa651ee3fffb2571e46f0619932c /gdb/breakpoint.c
parent10a3e37493f82c4548a09062063de3675e7f1bec (diff)
downloadgdb-0eaaa46a44378fe755b5ce17b6b5cfa75a22287d.zip
gdb-0eaaa46a44378fe755b5ce17b6b5cfa75a22287d.tar.gz
gdb-0eaaa46a44378fe755b5ce17b6b5cfa75a22287d.tar.bz2
* breakpoint.{c,h}: Add exp_string to struct breakpoint and use
it in breakpoint_re_set.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index c907f77..90e01ee 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1625,6 +1625,7 @@ watch_command (arg, from_tty)
b->val = val;
b->cond = 0;
b->cond_string = NULL;
+ b->exp_string = savestring (arg, strlen (arg));
mention (b);
}
@@ -2143,6 +2144,8 @@ delete_breakpoint (bpt)
free ((PTR)bpt->cond_string);
if (bpt->addr_string != NULL)
free ((PTR)bpt->addr_string);
+ if (bpt->exp_string != NULL)
+ free ((PTR)bpt->exp_string);
if (xgdb_verbose && bpt->type == bp_breakpoint)
printf ("breakpoint #%d deleted\n", bpt->number);
@@ -2235,11 +2238,20 @@ breakpoint_re_set_one (bint)
break;
case bp_watchpoint:
+ innermost_block = NULL;
+ b->exp = parse_expression (b->exp_string);
+ b->exp_valid_block = innermost_block;
+ b->val = evaluate_expression (b->exp);
+ release_value (b->val);
+ if (VALUE_LAZY (b->val))
+ value_fetch_lazy (b->val);
+
if (b->cond_string != NULL)
{
s = b->cond_string;
b->cond = parse_exp_1 (&s, (struct block *)0, 0);
}
+ mention (b);
break;
default: