2008-04-17 Marc Khouzam <marc.khouzam@ericsson.com>
authorMarc Khouzam <marc.khouzam@ericsson.com>
Fri, 18 Apr 2008 00:41:28 +0000 (00:41 +0000)
committerMarc Khouzam <marc.khouzam@ericsson.com>
Fri, 18 Apr 2008 00:41:28 +0000 (00:41 +0000)
       * breakpoint.c (update_watchpoint): Always reparse
       condition.

gdb/ChangeLog
gdb/breakpoint.c

index 881e61457518d4b33ad5fae36e5c7b140f31332e..2b6bfd25228daa2bfb9527950b044b4c0c03ae81 100644 (file)
@@ -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
index 20849c07546a2301cda25287b0ac0694f6ac8534..0c977923fc80f38c2fe8e9e8d96e06b2da8de46d 100644 (file)
@@ -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);
        }
     }