Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
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: Thu, 15 Nov 2007 05:59:00 -0000	[thread overview]
Message-ID: <fhgn7n$jpc$1@ger.gmane.org> (raw)
In-Reply-To: <uy7d0cfz1.fsf@gnu.org>

Eli Zaretskii wrote:

>> From: Vladimir Prus <vladimir@codesourcery.com>
>> Date: Wed, 14 Nov 2007 23:24:10 +0300
>> 
>> The delete_breakpoint function tries to check if the
>> breakpoint being deleted is inserted in inferior, and if
>> so, searched for breakpoints that are set at the same address
>> and tries to insert them.  However, GDB removes breakpoint
>> from the inferior immediately when inferior is stopped,
>> so this code will never run.
> 
> I think you are assuming that this code does and will always run
> synchronously.  Is that a valid assumption?

At the moment, I'm not aware of any way to invoke delete_breakpoint
while existing breakpoints are inserted. Is there one?
(In particular, "target async" does not seem to work at all).

In future, this situation might be possible. However, in general 
I think it's better to start by making code clear while still
working for current GDB, and then adjust it as needed for future GDB.
In this particular case, a call to insert_breakpoints, together
with some adjustments, would be much better for any future async code,
as it won't duplicate code logic.

- Volodya



  reply	other threads:[~2007-11-15  5:59 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 [this message]
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
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='fhgn7n$jpc$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