[Patch] Watchpoint condition fix

Marc Khouzam marc.khouzam@ericsson.com
Thu Apr 10 14:21:00 GMT 2008


Repost to gdb-patches from gdb mailing list post:
http://sourceware.org/ml/gdb/2008-04/msg00078.html

Watchpoint conditions are broken because they
get deleted when a watchpoint gets re-inserted.
When watchpoints get re-inserted, the condition 
string should be always reparsed.

Ok?

2008-04-10  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.307
diff -u -r1.307 breakpoint.c
--- gdb/breakpoint.c    14 Mar 2008 18:57:43 -0000      1.307
+++ gdb/breakpoint.c    10 Apr 2008 12:25:32 -0000
@@ -986,7 +986,7 @@
            value_free (v);
        }
 
-      if (reparse && b->cond_string != NULL)
+      if (b->cond_string != NULL)
        {
          char *s = b->cond_string;
          if (b->loc->cond)




More information about the Gdb-patches mailing list