From: Michael Walle <michael@walle.cc>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Patch Tracking <patches@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>,
Max Filippov <jcmvbkbc@gmail.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
Aurelien Jarno <aurelien@aurel32.net>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH] gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag
Date: Mon, 06 Oct 2014 00:07:25 +0200 [thread overview]
Message-ID: <2269835.dOncxI2WOO@thanatos> (raw)
In-Reply-To: <CAFEAcA_VVRxbxo5Ogc8Ackhs1hswTzEV3jWooVp=bZvq=x2n8g@mail.gmail.com>
Am Sonntag, 5. Oktober 2014, 22:48:05 schrieb Peter Maydell:
> On 5 October 2014 22:36, Peter Maydell <peter.maydell@linaro.org> wrote:
> > On 5 October 2014 22:00, Michael Walle <michael@walle.cc> wrote:
> >> I can confirm that your patch makes qemu stop one instruction earlier.
> >> Without your patch the program is stopped at (3). With your patch
> >> applied the program is stopped at (2). But I guess the correct point to
> >> stop is (1), right?>
> > No, gdb wants execution to stop with the PC just after the
> > instruction which issued the memory access, with whatever
> > effects the instruction had having already taken place.
> > So (2) is correct. (I think nicer UI would indeed be to
> > stop at (1) but you can't get that effect on CPUs like
> > x86 which only stop after the wp insn has executed, and
> > they'd rather be consistent.)
>
> ...and incidentally the way it achieves this for "stop before
> wp insn" CPU targets is that it unsets the watchpoint
> and automatically steps one instruction before returning
> control to the gdb user. (You can see this if you turn
> gdb's remote-protocol debug on.)
Ah, now it makes sense :)
Tested-by: Michael Walle <michael@walle.cc> (for lm32)
--
-michael
next prev parent reply other threads:[~2014-10-05 22:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-12 18:04 [Qemu-devel] [PATCH] gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag Peter Maydell
2014-09-16 3:59 ` Max Filippov
2014-09-16 4:15 ` Peter Maydell
2014-09-16 5:16 ` Max Filippov
2014-09-29 18:58 ` Max Filippov
2014-09-16 11:46 ` Edgar E. Iglesias
2014-10-05 21:00 ` Michael Walle
2014-10-05 21:36 ` Peter Maydell
2014-10-05 21:48 ` Peter Maydell
2014-10-05 22:07 ` Michael Walle [this message]
2014-10-06 14:43 ` Peter Maydell
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=2269835.dOncxI2WOO@thanatos \
--to=michael@walle.cc \
--cc=aurelien@aurel32.net \
--cc=edgar.iglesias@gmail.com \
--cc=jcmvbkbc@gmail.com \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).