From: Peter Jay Salzman <p@dirac.org>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: Gdb Mailing List <gdb@sources.redhat.com>
Subject: Re: rules for conditional breakpoints
Date: Wed, 25 Sep 2002 23:40:00 -0000 [thread overview]
Message-ID: <20020926064006.GA25116@dirac.org> (raw)
In-Reply-To: <Pine.SUN.3.91.1020926075004.12918I@is>
hi eli,
unfortunately, the user manual doesn't really say much about this. the
relevent section is 5.1.6 (break conditions) which references section
8.1 (expressions).
in the first paragraph os 5.1.6:
A condition is just a Boolean expression in your programming language
(see section 8.1 Expressions).
but this is where my confusion is coming from. here is a boolean
expression:
break main if cos(0.0) == 1.0
the condition "cos(0.0) == 1.0" is a boolean expression. it's either
true or false. yet it's not valid in a conditional breakpoint.
looking further down the section 5.1.6, it mentions that user defined
functions are allowed in conditions.
looking at section 8.1, it has something relevent:
Any kind of constant, variable or operator defined by the programming
language you are using is valid in an expression in GDB. This
includes conditional expressions, function calls, casts and string
constants. It unfortunately does no include symbols defined by
preprocessor #define commands.
this is kind of ambiguous whether "the programming language" includes
glibc or not. if it doesn't, then i'm unsure what "functions" this
paragraph is talking about. if it does, then it directly conflicts with
my "cos(0.0) == 1.0" as an example of something that should work but
doesn't.
either way, i can appreciate the fact that the user's manual doesn't
have examples. that's what books are for. but it seems to me that it
leaves some details in an ambiguous state.
this email was longer than i intended. thanks for reading down to here.
:)
peter
begin Eli Zaretskii <eliz@is.elta.co.il>
>
> On Wed, 25 Sep 2002, Peter Jay Salzman wrote:
>
> > what exactly are the rules for conditional breakpoints?
>
> If that's not clear from reading the manual, I think we should fix the
> manual.
--
Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
next prev parent reply other threads:[~2002-09-26 6:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-25 22:10 Peter Jay Salzman
2002-09-25 22:53 ` Eli Zaretskii
2002-09-25 23:40 ` Peter Jay Salzman [this message]
2002-09-26 7:23 ` Daniel Jacobowitz
2002-09-26 13:55 ` Jim Blandy
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=20020926064006.GA25116@dirac.org \
--to=p@dirac.org \
--cc=eliz@is.elta.co.il \
--cc=gdb@sources.redhat.com \
/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