Re: Trap flag handling change in 2.6.10-bk5 broke Kylix debugger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In-Reply-To: <[email protected]>

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux