This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] breakpoint.c (breakpoint_cond_eval): Fix and enhance comment.
- From: Doug Evans <xdje42 at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 12 Nov 2013 21:50:02 -0800
- Subject: [commit] breakpoint.c (breakpoint_cond_eval): Fix and enhance comment.
- Authentication-results: sourceware.org; auth=none
Hi.
fyi, I committed this.
It took a bit to determine why breakpoint_cond_eval returns
the inverted condition result, so I wrote it down.
2013-11-13 Doug Evans <xdje42@gmail.com>
* breakpoint.c (breakpoint_cond_eval): Fix and enhance comment.
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 36252ee..f0b496d 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4649,10 +4649,12 @@ bpstat_print (bpstat bs, int kind)
return PRINT_UNKNOWN;
}
-/* Evaluate the expression EXP and return 1 if value is zero. This is
- used inside a catch_errors to evaluate the breakpoint condition.
+/* Evaluate the expression EXP and return 1 if value is zero.
+ This returns the inverse of the condition because it is called
+ from catch_errors which returns 0 if an exception happened, and if an
+ exception happens we want execution to stop.
The argument is a "struct expression *" that has been cast to a
- "char *" to make it pass through catch_errors. */
+ "void *" to make it pass through catch_errors. */
static int
breakpoint_cond_eval (void *exp)