From: Peter Jay Salzman <p@dirac.org>
To: Gdb Mailing List <gdb@sources.redhat.com>
Subject: rules for conditional breakpoints
Date: Wed, 25 Sep 2002 22:10:00 -0000 [thread overview]
Message-ID: <20020926051031.GA24523@dirac.org> (raw)
hi all,
what exactly are the rules for conditional breakpoints? clearly the
condition can use the standard boolean operators, along with the logical
qualifiers:
break main if i > 3
break test.c:3 if i !=0 && j <=0
but libc functions linked to the code also seem to work:
break 40 if *(string + strlen(string)) != '\0'
from a previous email i sent to this list, i gather that strlen() works
"by accident", and only functions that return an int work. so this
won't work, even with typecasting:
break 1 if (double)cos(0) == 1.0L
so, this seems to be the rule for conditional breakpoints:
1. equality/inequality operators. ie:
<, >, <=, >=
2. logic operators. ie:
&&, ||
3. libc functions linked to code but ONLY if they return an int. ie:
strlen(), abs()
is this correct?
thanks!
pete
--
Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
next reply other threads:[~2002-09-26 5:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-25 22:10 Peter Jay Salzman [this message]
2002-09-25 22:53 ` Eli Zaretskii
2002-09-25 23:40 ` Peter Jay Salzman
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=20020926051031.GA24523@dirac.org \
--to=p@dirac.org \
--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