Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: vladimir@codesourcery.com (Vladimir Prus)
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Stop infrun from tracking breakpoint insertion status.
Date: Thu, 22 Nov 2007 00:49:00 -0000	[thread overview]
Message-ID: <200711220049.lAM0nMuF005074@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <200711202348.45105.vladimir@codesourcery.com> from "Vladimir Prus" at Nov 20, 2007 11:48:44 PM

Vladimir Prus wrote:

> The use of breakpoints_meant_to_be_inserted in handle_inferiour_event, 
> for the TARGET_WAITKIND_LOADED,  did not matter because 
> TARGET_WAITKIND_LOADED is used by just a few targets.
> And even if remote.c can use it, it does not do when 
> using gdbserver, which makes it hard to test.

Hmmm, if it helps, I could run a test on AIX, which does use
TARGET_WAITKIND_LOADED.

In any case, at this point breakpoints *must* be inserted -- the
very next thing the code does is to call
          resume (0, TARGET_SIGNAL_0);
so if breakpoints were not inserted, we'd just run the inferior
to completion now.

So I think the check is not necessary, and we should simply
unconditionally insert breakpoints at this point. 
 
> The reason that use in keep_going does not break anything is that
> the intention of the code is to insert breakpoints, unless either
> they are already inserted, or ecs->another_trap is non-zero. However,
> insert_bp_location will immediately return if breakpoint location
> is already inserted. Therefore, the "already inserted" check is
> not necessary at all, and I removed it.

OK, agreed.
 
> As for the use in insert_step_resume_breakpoint_at_sal, I must admit
> I've got lost in the code again -- I don't know how previous version
> of the patch did not cause any problems.

I think this is because calls to insert_step_resume_breakpoint_at_sal
are always followed by calls to keep_going -- and due to the behaviour
you described above, with your old patch keep_going would always 
insert the step-resume breakpoint anyway.

In fact, I think with the change to keep_going to always insert all
breakpoints there is no need for insert_step_resume_breakpoint_at_sal
to call insert_breakpoints at all anymore.  This should probably
best be removed.


If I've counted correctly, with the changes I've described we've
completely eliminated the need for breakpoints_meant_to_be_inserted.
Would you mind updating your patch accordingly?


Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2007-11-22  0:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-18 11:41 Vladimir Prus
2007-11-19 11:39 ` Ulrich Weigand
2007-11-19 17:00   ` Vladimir Prus
2007-11-20 20:48   ` Vladimir Prus
2007-11-22  0:49     ` Ulrich Weigand [this message]
2007-11-22 15:21       ` Vladimir Prus
2007-11-26 15:25         ` Ulrich Weigand
2007-11-27 17:49           ` Vladimir Prus
2007-11-27 18:14             ` Ulrich Weigand
2007-11-28 12:50               ` Vladimir Prus
2007-11-27 18:55           ` Vladimir Prus
2007-11-28 22:24             ` Ulrich Weigand
2007-11-29 18:46               ` Vladimir Prus

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=200711220049.lAM0nMuF005074@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=vladimir@codesourcery.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