aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2013-11-12 21:40:41 -0800
committerDoug Evans <xdje42@gmail.com>2013-11-12 21:45:47 -0800
commitc42bd95ac2827f22c134f13752c44ecc69d153f7 (patch)
treeae78c428ca29619ca152b5452a942817f87d1edf
parent5efd1b2bff8739b00cddc505c7be9a8ca2ad0b71 (diff)
downloadgdb-c42bd95ac2827f22c134f13752c44ecc69d153f7.zip
gdb-c42bd95ac2827f22c134f13752c44ecc69d153f7.tar.gz
gdb-c42bd95ac2827f22c134f13752c44ecc69d153f7.tar.bz2
* breakpoint.c (breakpoint_cond_eval): Fix and enhance comment.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/breakpoint.c8
2 files changed, 9 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1572249..c86f25d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2013-11-13 Doug Evans <xdje42@gmail.com>
+
+ * breakpoint.c (breakpoint_cond_eval): Fix and enhance comment.
+
2013-11-13 Joel Brobecker <brobecker@adacore.com>
* mi/mi-main.c (mi_cmd_list_features): Replace "info-ada-exceptions"
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)