aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Khouzam <marc.khouzam@ericsson.com>2008-04-18 00:41:28 +0000
committerMarc Khouzam <marc.khouzam@ericsson.com>2008-04-18 00:41:28 +0000
commit2ec9323810b0e79950818f47f50de231467e6976 (patch)
treeaf3382b4711ea70ae7e63a372facccaf906c928a
parent3f7df0f0f494dd1dc08d29ec46b881f3f1e4d872 (diff)
downloadgdb-2ec9323810b0e79950818f47f50de231467e6976.zip
gdb-2ec9323810b0e79950818f47f50de231467e6976.tar.gz
gdb-2ec9323810b0e79950818f47f50de231467e6976.tar.bz2
2008-04-17 Marc Khouzam <marc.khouzam@ericsson.com>
* breakpoint.c (update_watchpoint): Always reparse condition.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/breakpoint.c11
2 files changed, 10 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 881e614..2b6bfd2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-17 Marc Khouzam <marc.khouzam@ericsson.com>
+
+ * breakpoint.c (update_watchpoint): Always reparse
+ condition.
+
2008-04-17 Joel Brobecker <brobecker@adacore.com>
* breakpoint.c (print_one_breakpoint_location): Make sure to print
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 20849c0..0c97792 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -994,14 +994,13 @@ update_watchpoint (struct breakpoint *b, int reparse)
value_free (v);
}
- if (reparse && b->cond_string != NULL)
+ /* We just regenerated the list of breakpoint locations.
+ The new location does not have its condition field set to anything
+ and therefore, we must always reparse the cond_string, independently
+ of the value of the reparse flag. */
+ if (b->cond_string != NULL)
{
char *s = b->cond_string;
- if (b->loc->cond)
- {
- xfree (b->loc->cond);
- b->loc->cond = NULL;
- }
b->loc->cond = parse_exp_1 (&s, b->exp_valid_block, 0);
}
}