This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [Patch] Watchpoint condition fix
> Reformat the comment to avoid the '*' at the beginning of each line
> and put the final '*/' at the end of the last line, not on a new line:
Forgot about that. Eclipse does the comments in its own way.
I fixed it.
I committed the following:
2008-04-17 Marc Khouzam <marc.khouzam@ericsson.com>
* breakpoint.c (update_watchpoint): Always reparse
condition.
Index: gdb/breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.309
diff -u -r1.309 breakpoint.c
--- gdb/breakpoint.c 17 Apr 2008 22:43:17 -0000 1.309
+++ gdb/breakpoint.c 18 Apr 2008 00:35:22 -0000
@@ -994,14 +994,13 @@
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);
}
}