From: Will Deacon <will.deacon@arm.com>
To: Pedro Alves <palves@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Joel Brobecker <brobecker@adacore.com>,
Marcus Shawcroft <marcus.shawcroft@gmail.com>,
Terry Guo <Terry.Guo@arm.com>,
Marcus Shawcroft <Marcus.Shawcroft@arm.com>,
"lgustavo@codesourcery.com" <lgustavo@codesourcery.com>,
"yao@codesourcery.com" <yao@codesourcery.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
"Gareth, McMullin" <gareth@blacksphere.co.nz>
Subject: Re: [RFA/commit] arm-tdep.c: Do not single-step after hitting a watchpoint
Date: Tue, 30 Sep 2014 09:24:00 -0000 [thread overview]
Message-ID: <20140930092416.GF8075@arm.com> (raw)
In-Reply-To: <542A746C.5010901@redhat.com>
On Tue, Sep 30, 2014 at 10:14:20AM +0100, Pedro Alves wrote:
> On 09/30/2014 09:57 AM, Will Deacon wrote:
> > On Mon, Sep 29, 2014 at 07:23:05PM +0100, Peter Maydell wrote:
> >> Joel Brobecker wrote:
> >>> I have been trying to understand the various contributions, and
> >>> I admit I am still not quite sure...
> >>>
> >>> Does it look like the patch I proposed is correct? It seems to be
> >>> supported by Terry Guo's experiments as well...
> >>
> >> Note that the ARMv7 architecture allows watchpoints to
> >> be implemented as *asynchronous*, in which case what
> >> you will see is that you take a watchpoint exception
> >> but it may not fire until after the instruction that
> >> triggers the watchpoint and possibly several following
> >> instructions have all finished execution. This may be
> >> what you are seeing in your hardware tests.
> >
> > No you won't; the kernel will swallow the async watchpoint and complain in
> > dmesg.
>
> It doesn't seem to swallow it; only warn. In hw_breakpoint_pending:
>
>
> /* Perform perf callbacks. */
> switch (ARM_DSCR_MOE(dscr)) {
> case ARM_ENTRY_BREAKPOINT:
> breakpoint_handler(addr, regs);
> break;
> case ARM_ENTRY_ASYNC_WATCHPOINT:
> WARN(1, "Asynchronous watchpoint exception taken. Debugging results may be unreliable\n");
> case ARM_ENTRY_SYNC_WATCHPOINT:
> watchpoint_handler(addr, fsr, regs);
> break;
>
> Note the fallthrough.
>
> In any case, GDB has to care about halt mode, jtag, system, etc.
> debugging, not just Linux.
>
> > I'm not aware of any CPU implementations that actually generate these.
>
> Thanks. Until we hear a clearer report otherwise, that's what I'll
> assume going forward.
Now that I've realised you were also talking about ARMv6, I should clarify
that I was only referring to v7-A (and v8, since that's architected) CPUs.
For v6, all watchpoint exceptions are reported via the asynchronous method.
You can use the WFAR register to determine the instruction responsible for
the fault.
Will
next prev parent reply other threads:[~2014-09-30 9:24 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-29 18:23 Peter Maydell
2014-09-29 22:15 ` Pedro Alves
2014-09-29 22:54 ` Peter Maydell
2014-09-30 9:08 ` Pedro Alves
2014-09-30 9:18 ` Will Deacon
2014-09-30 10:07 ` Pedro Alves
2014-09-30 10:18 ` Peter Maydell
2014-09-30 10:38 ` Pedro Alves
2014-09-30 10:01 ` Peter Maydell
2014-09-30 10:34 ` Pedro Alves
2014-09-30 12:54 ` Pedro Alves
2014-09-30 13:50 ` Joel Brobecker
2014-09-30 14:11 ` Pedro Alves
2014-09-30 14:26 ` Joel Brobecker
2014-09-30 14:50 ` Peter Maydell
2014-09-30 8:57 ` Will Deacon
2014-09-30 9:04 ` Will Deacon
2014-09-30 9:14 ` Pedro Alves
2014-09-30 9:24 ` Will Deacon [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-09-15 13:01 Joel Brobecker
2014-09-16 11:12 ` Yao Qi
2014-09-16 11:59 ` Joel Brobecker
2014-09-16 12:05 ` Luis Machado
2014-09-16 12:48 ` Joel Brobecker
2014-09-16 13:09 ` Luis Machado
2014-09-16 15:21 ` Pedro Alves
2014-09-18 11:40 ` Marcus Shawcroft
2014-09-19 17:31 ` Pedro Alves
2014-09-29 17:51 ` Joel Brobecker
2014-09-29 17:57 ` Luis Machado
2014-09-29 21:04 ` Pedro Alves
2014-09-30 8:54 ` Will Deacon
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=20140930092416.GF8075@arm.com \
--to=will.deacon@arm.com \
--cc=Marcus.Shawcroft@arm.com \
--cc=Terry.Guo@arm.com \
--cc=brobecker@adacore.com \
--cc=gareth@blacksphere.co.nz \
--cc=gdb-patches@sourceware.org \
--cc=lgustavo@codesourcery.com \
--cc=marcus.shawcroft@gmail.com \
--cc=palves@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=yao@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