This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/commit] arm-tdep.c: Do not single-step after hitting a watchpoint
- From: Peter Maydell <peter dot maydell at linaro dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Pedro Alves <palves at redhat dot com>, Marcus Shawcroft <marcus dot shawcroft at gmail dot com>, Terry dot Guo at arm dot com, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, "lgustavo at codesourcery dot com" <lgustavo at codesourcery dot com>, yao at codesourcery dot com, gdb-patches at sourceware dot org, Will Deacon <Will dot Deacon at arm dot com>, "Gareth, McMullin" <gareth at blacksphere dot co dot nz>
- Date: Tue, 30 Sep 2014 15:50:12 +0100
- Subject: Re: [RFA/commit] arm-tdep.c: Do not single-step after hitting a watchpoint
- Authentication-results: sourceware.org; auth=none
- References: <CAFEAcA_0C+UqGwM39A4EQCQLg59fNbJ2du8rhrt++Q-pdE9rgQ at mail dot gmail dot com> <5429D9FC dot 6000509 at redhat dot com> <CAFEAcA9Dx5GE6QCktvbQF8sL1MsRxE5BmPNruSw4FsW9VyD_2w at mail dot gmail dot com> <542A72F9 dot 5090203 at redhat dot com> <CAFEAcA9CFb+NbpMc_O1e2VQHngG0t481STay7c9-p1DQFR8jTA at mail dot gmail dot com> <542A872B dot 9050203 at redhat dot com> <542AA806 dot 10804 at redhat dot com> <20140930135031 dot GD6927 at adacore dot com> <542AB9E3 dot 5090100 at redhat dot com> <20140930142612 dot GE6927 at adacore dot com>
On 30 September 2014 15:26, Joel Brobecker <brobecker@adacore.com> wrote:
> That's very interesting. When I talked to one of our QEMU developers
> in house about this, he wasn't even sure if it was possible for
> QEMU to stop at the instruction triggering the watchpoint. Now,
> we know it is, but it could be simpler for QEMU to implement the
> same policy on all targets.
QEMU's stub has to implement "act like the hardware does" for
each individual target CPU, because that's what existing gdb
implementations in the field expect. "Act the same in the
stub regardless of target CPU" is what we used to do and
the result was not stopping in the right place.
The actual in-QEMU implementation is pretty trivial, since
we already need to support both behaviours in order to
correctly emulate the architectural debug support we
expose to guest OSes, and it's then just a matter of
setting or not setting a flag when we set up the wp.
-- PMM