Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@cygnus.com>
To: Daniel Jacobowitz <dmj+@andrew.cmu.edu>, gdb-patches@sources.redhat.com
Subject: Re: PATCH: resume + threads + software stepping == boom
Date: Fri, 08 Jun 2001 16:20:00 -0000	[thread overview]
Message-ID: <3B215DBE.E9E4463A@cygnus.com> (raw)
In-Reply-To: <3B215D60.78921819@cygnus.com>

Michael Snyder wrote:
> 
> Daniel Jacobowitz wrote:
> >
> > resume () in infrun.c has this block:
> >
> >   if (SOFTWARE_SINGLE_STEP_P () && step)
> >     {
> >       /* Do it the hard way, w/temp breakpoints */
> >       SOFTWARE_SINGLE_STEP (sig, 1 /*insert-breakpoints */ );
> >       /* ...and don't ask hardware to do it.  */
> >       step = 0;
> >
> > Then, further down, if (use_thread_step_needed && thread_step_needed)
> > and there's already a breakpoint at the PC, is this:
> >
> >               if (!step)
> >                 {
> >                   warning ("Internal error, changing continue to step.");
> >
> > That blows up, because step will always be zero here if
> > SOFTWARE_SINGLE_STEP_P ().  Is this patch OK?  It seems to work in my tests
> > here.
> 
> I like the problem analysis, but not the implementation of the solution.
> If we are going to always set step to zero for SOFTWARE_SINGLE_STEP_P,
> then it does not make sense to set it to one again, even if the code
> will never be reached (in theory).  I would rather see it made explicit
> that this code should never be reached if SOFTWARE_SINGLE_STEP_P is true.
> Something like this:
> 
> <       if (!step)
> ---
> >       if (!(step && SOFTWARE_SINGLE_STEP_P()))

Err, my logic is wrong, but you get the idea...  maybe I meant
	if (!step && !SOFTWARE_SINGLE_STEP_P())


  reply	other threads:[~2001-06-08 16:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-08 12:34 Daniel Jacobowitz
2001-06-08 14:10 ` Daniel Jacobowitz
2001-06-08 16:19 ` Michael Snyder
2001-06-08 16:20   ` Michael Snyder [this message]
2001-06-08 16:43     ` Daniel Jacobowitz
     [not found]       ` <3B225994.9060502@cygnus.com>
2001-06-09 16:05         ` Daniel Jacobowitz
2001-06-10 21:40           ` Michael Snyder
2001-06-13 15:21           ` Michael Snyder
2001-06-09 13:34 ` Andrew Cagney
2001-06-09 15:44   ` Daniel Jacobowitz
2001-06-11 17:53     ` 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=3B215DBE.E9E4463A@cygnus.com \
    --to=msnyder@cygnus.com \
    --cc=dmj+@andrew.cmu.edu \
    --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