From: Nick Roberts <nickrob@snap.net.nz>
Cc: emacs-devel@gnu.org
Subject: gdb-ui bogosity with conditional breakpoints
Date: Fri, 7 Apr 2006 10:50:13 +1200 [thread overview]
Message-ID: <17461.39717.778822.915855@farnswood.snap.net.nz> (raw)
In-Reply-To: <87k6a3tvnd.fsf@catnip.gol.com>
> I'm running a program invoked with Emacs gdb-ui with a conditional
> breakpoint. Normally gdb will appear to just run silently until it hits
> the breakpoint and the condition evaluates to true (it's somewhat
> slower than normal because of gdb's involvement, but in many cases,
> quite usable).
>
> However, using gdb-ui, it appears to be notifying Emacs _every time_ it
> hits the breakpoint, even when the condition is not true! As a result
> it's running, but the "run status" in the mode-line keeps flickering
> between "[running]" and "[stopped]", and the "current location" icon in
> the fring is flashing (at the breakpoint position).
You don't say what your condition was, but my crystal ball (which can't see
as clearly as Stefan's) says that it calls a function e.g
int mysquare (int x)
{
return x*x;
}
(gdb) break 81 if mysquare (i) == 49
and that something like
(gdb) break 81 if i == 7
doesn't have the same problem.
> This _drastically_ slows down execution, far more than the normal speed
> penalty for using a conditional breakpoint. It also insists on popping
> up the source window every time it hits the breakpoint (even though it
> doesn't actually stop), which obviously messes up the user's window
> arrangement (continually!).
It might be a bit quicker if you use GDB 6.4 as this version doesn't spew
out so many annotations for level 3.
> Is there anyway to disable this behavior? If so, I think it should be
> the default -- the icon and mode-line flashing is not particularly
> useful, and the annoyance level is fairly high.
If my diagnosis is correct then I think the answer is no, without delving into
GDB to stop the erroneous starting and stopped annotations from being
generated. I don't plan to do that because a) annotations are being
deprecated and b) while setting a condition on a breakpoint with a function is
perfectly reasonable, it's probably not done that often.
If my diagnosis is wrong, please post a complete testcase and/or the value of
gdb-debug-ring (after setting gdb-enable-debug to t at the start of the
session). Keep the number of iterations small but if there is still a
lot of data please send it off list.
--
Nick http://www.inet.net.nz/~nickrob
next prev parent reply other threads:[~2006-04-06 22:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-06 0:06 gdb-ui bogosity with conditional breakpoints Miles Bader
2006-04-06 22:50 ` Nick Roberts [this message]
2006-04-07 2:29 ` Miles Bader
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=17461.39717.778822.915855@farnswood.snap.net.nz \
--to=nickrob@snap.net.nz \
--cc=emacs-devel@gnu.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.