From: Doug Evans <xdje42@gmail.com>
To: gdb-patches@sourceware.org
Subject: [commit] breakpoint.c (breakpoint_cond_eval): Fix and enhance comment.
Date: Wed, 13 Nov 2013 08:11:00 -0000 [thread overview]
Message-ID: <m3siv0q29h.fsf@seba.sebabeach.org> (raw)
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)
next reply other threads:[~2013-11-13 5:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 8:11 Doug Evans [this message]
2013-11-14 17:58 ` [PATCH, doc RFA] Allow CLI and Python conditions to be set on same breakpoint Doug Evans
2013-11-14 18:44 ` Pedro Alves
2013-11-14 20:22 ` Phil Muldoon
2013-11-14 20:54 ` Tom Tromey
2013-11-14 21:21 ` Pedro Alves
2013-11-15 6:39 ` Doug Evans
2013-11-15 12:06 ` Pedro Alves
2013-11-15 16:30 ` Doug Evans
2013-11-15 16:45 ` Pedro Alves
2013-11-17 17:22 ` Doug Evans
2013-11-15 20:58 ` Tom Tromey
2013-11-17 17:59 ` Doug Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3siv0q29h.fsf@seba.sebabeach.org \
--to=xdje42@gmail.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox