]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* breakpoint.c (update_watchpoint): Always reparse
authorJoel Brobecker <brobecker@gnat.com>
Tue, 22 Apr 2008 20:26:00 +0000 (20:26 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Tue, 22 Apr 2008 20:26:00 +0000 (20:26 +0000)
       condition.

gdb/ChangeLog
gdb/breakpoint.c

index d23c2eacfc41bfbd0b9bba6f3d69d860deabe2ae..fd1c5d6dba39fc1d28da8d6d95f03462f5c29e53 100644 (file)
@@ -1,3 +1,8 @@
+2008-04-22  Marc Khouzam  <marc.khouzam@ericsson.com>
+
+       * breakpoint.c (update_watchpoint): Always reparse
+       condition.
+
 2008-04-18  Joel Brobecker  <brobecker@adacore.com>
 
        * breakpoint.c (print_one_breakpoint_location): Make sure to print
index 85022a031ef0dac7f6c89bd6ed51b8562c529187..1a711cfac798b672f0caf1a0d3a145e9ff739f1b 100644 (file)
@@ -967,14 +967,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);
        }
     }