public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chuck Ebbert <76306.1226@compuserve.com>
To: Paulo Marques <pmarques@grupopie.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: Trap flag handling change in 2.6.10-bk5 broke Kylix debugger
Date: Tue, 14 Feb 2006 22:17:57 -0500	[thread overview]
Message-ID: <200602142220_MC3-1-B866-DF84@compuserve.com> (raw)

In-Reply-To: <43F23BB4.8070703@grupopie.com>

On Tue, 14 Feb 2006 at 20:21:08 +0000, Paulo Marques wrote:

> Going even further, a 2.6.10-bk5 kernel without this single change runs 
> the debugger just fine:
> 
> > @@ -718,23 +717,21 @@
> >              */
> >             if ((regs->xcs & 3) == 0)
> >                     goto clear_TF_reenable;
> > -           if ((tsk->ptrace & (PT_DTRACE|PT_PTRACED)) == PT_DTRACE)
> > -                   goto clear_TF;
> > +
> > +           /*
> > +            * Was the TF flag set by a debugger? If so, clear it now,
> > +            * so that register information is correct.
> > +            */
> > +           if (tsk->ptrace & PT_DTRACE) {
> > +                   regs->eflags &= ~TF_MASK;
> > +                   tsk->ptrace &= ~PT_DTRACE;
> > +                   if (!tsk->ptrace & PT_DTRACE)
                            ^^^^^^^^^^^^^^^^^^^^^^^^
  Looks like this is always true because that bit was cleared one line above.
Maybe it should be testing PT_DTRACED instead?  And it's missing parens too,
so try:
                        if (!(tsk->ptrace & PT_DTRACED))


> > +                           goto clear_TF;
> > +           }
> >     }
> >  
> >     /* Ok, finally something we can handle */

-- 
Chuck
"Equations are the Devil's sentences."  --Stephen Colbert

             reply	other threads:[~2006-02-15  3:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-15  3:17 Chuck Ebbert [this message]
2006-02-15 17:46 ` Trap flag handling change in 2.6.10-bk5 broke Kylix debugger Paulo Marques
  -- strict thread matches above, loose matches on Subject: below --
2006-02-14 20:21 Paulo Marques
2006-02-14 20:52 ` Linus Torvalds
2006-02-15 17:43   ` Paulo Marques

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=200602142220_MC3-1-B866-DF84@compuserve.com \
    --to=76306.1226@compuserve.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmarques@grupopie.com \
    --cc=torvalds@osdl.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox