From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Roland McGrath <roland@redhat.com>
Cc: linuxppc-dev@ozlabs.org, utrace-devel@redhat.com
Subject: Re: [PATCH] powerpc ptrace block-step
Date: Fri, 03 Apr 2009 12:43:27 +1100 [thread overview]
Message-ID: <1238723007.10752.19.camel@pasglop> (raw)
In-Reply-To: <20090403004450.F2166FC3AB@magilla.sf.frob.com>
On Thu, 2009-04-02 at 17:44 -0700, Roland McGrath wrote:
> > The patch only implements it for "server/classic" processors, not BookE,
> > thus it should probably only advertise it for these :-)
> >
> > Though it wouldn't be too hard to implement it for BookE using DBCR0:BRT
> > (Branch Taken debug event) though it might need some careful fixups such
> > as the one we have for single step regarding hitting exception entry
> > code.
>
> In that case, this code seems fairly mysterious:
>
> > > +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE)
> > > + task->thread.dbcr0 = DBCR0_IDM | DBCR0_BT;
> > > + regs->msr |= MSR_DE;
>
> That doesn't already do whatever it is you described?
It should, I missed that bit. Except for the possible issue with
interrupts.
> Can we assume now that you or someone else who knows what all that means
> will take this up?
I can take this up after I'm back from vacation, which will be in about
4 weeks from now, but maybe Josh can give it a go in the meantime.
Basically, the "issue" with BookE is that the debug interrupts aren't
masked by the fact of taking an exception. So for example, if you have
single step enabled and take a TLB miss on a userland load, you'll take
a single step exception on the first (or rather the second but that's
a detail) instruction of the TLB miss exception vector.
The code for our BookE debug interrupts has a workaround that detects
that case and returns to the TLB miss vector with MSR:DE cleared, but
I think that code will not properly catch a similar things happening
due to block step. Though is should be easy to fix.
Cheers,
Ben.
next prev parent reply other threads:[~2009-04-03 1:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-01 21:59 [PATCH] powerpc ptrace block-step Roland McGrath
2009-04-02 5:26 ` Benjamin Herrenschmidt
2009-04-03 0:44 ` Roland McGrath
2009-04-03 1:13 ` Josh Boyer
2009-04-03 1:59 ` Roland McGrath
2009-04-03 12:10 ` Frank Ch. Eigler
2009-04-03 1:43 ` Benjamin Herrenschmidt [this message]
2009-05-29 5:03 ` Benjamin Herrenschmidt
2009-05-29 7:32 ` Roland McGrath
2009-05-29 7:39 ` Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2008-05-02 6:51 Roland McGrath
2008-05-23 6:21 ` Michael Ellerman
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=1238723007.10752.19.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=roland@redhat.com \
--cc=utrace-devel@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;
as well as URLs for NNTP newsgroup(s).