From: Vladimir Prus <ghost@cs.msu.su>
To: gdb-patches@sources.redhat.com
Subject: Re: delete_breakpoint: don't try to insert other breakpoints
Date: Fri, 16 Nov 2007 22:24:00 -0000 [thread overview]
Message-ID: <fhl5b4$k4v$1@ger.gmane.org> (raw)
In-Reply-To: <18238.3787.459206.333769@kahikatea.snap.net.nz>
Nick Roberts wrote:
> > > Eli, how is code which will never be reached a feature?
> >
> > The code is never reached only as long as breakpoints are deleted
> > synchronously (because we remove the breakpoint instruction as soon as
> > the inferior stops).
>
> I've run the testsuite using my asynchronous version of GDB, with and
> without Vladimir's change and, in fact, there was one less failure and
> seven more passes with it. Notably, the extra passes with
> print-threads.exp involved breakpoints.
>
> Of course, this doesn't prove anything, and there may be a test that
> shows the contrary, but it might provide some context.
In fact, I've run across this code today while doing something different,
and I now believe it's even not theoretically unused -- it's wrong.
There are two possible cases for having breakpoints inserted when
doing delete_breakpoint:
1. Just not removing breakpoints from inferior when we stop.
2. Ability to delete breakpoints from inferior while inferior is
actually running.
(1) does not seem useful for anything. For (2), delete_breakpoint will:
- Remove the breakpoint from inferior
- See if there's another breakpoint at the same address
- Try to insert it
As the result, there's a window when a breakpoint that should be inserted
is actually not.
- Volodya
next prev parent reply other threads:[~2007-11-16 22:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-14 20:24 Vladimir Prus
2007-11-15 4:04 ` Eli Zaretskii
2007-11-15 5:59 ` Vladimir Prus
2007-11-16 10:13 ` Eli Zaretskii
2007-11-16 10:34 ` Vladimir Prus
2007-11-16 11:15 ` Eli Zaretskii
2007-11-16 13:02 ` Daniel Jacobowitz
2007-11-16 14:14 ` Vladimir Prus
2007-11-16 15:09 ` Eli Zaretskii
2007-11-16 21:44 ` Nick Roberts
2007-11-16 22:24 ` Vladimir Prus [this message]
2007-11-17 9:13 ` Eli Zaretskii
2007-11-18 1:25 ` Nick Roberts
2007-12-16 21:13 ` Daniel Jacobowitz
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='fhl5b4$k4v$1@ger.gmane.org' \
--to=ghost@cs.msu.su \
--cc=gdb-patches@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