This is the mail archive of the
mailing list for the GDB project.
Re: [RFA/commit] arm-tdep.c: Do not single-step after hitting a watchpoint.
- From: Luis Machado <lgustavo at codesourcery dot com>
- To: Joel Brobecker <brobecker at adacore dot com>, Pedro Alves <palves at redhat dot com>
- Cc: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>, Terry Guo <terry dot guo at arm dot com>, Marcus Shawcroft <marcus dot shawcroft at arm dot com>, Yao Qi <yao at codesourcery dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Will Deacon <will dot deacon at arm dot com>, <peter dot maydell at arm dot com>, "gareth at blacksphere dot co dot nz >> Gareth McMullin" <gareth at blacksphere dot co dot nz>
- Date: Mon, 29 Sep 2014 14:57:10 -0300
- Subject: Re: [RFA/commit] arm-tdep.c: Do not single-step after hitting a watchpoint.
- Authentication-results: sourceware.org; auth=none
- References: <1410786062-19274-1-git-send-email-brobecker at adacore dot com> <87bnqf2578 dot fsf at codesourcery dot com> <20140916115936 dot GM4871 at adacore dot com> <5418279A dot 1040604 at codesourcery dot com> <20140916124814 dot GO4871 at adacore dot com> <54183681 dot 3010504 at codesourcery dot com> <5418556E dot 7010502 at redhat dot com> <CAFqB+PxZM3Zb0J2HRoULU+e30jMP9OowRFsgJCjaWf7tNvagTA at mail dot gmail dot com> <541C6860 dot 9070907 at redhat dot com> <20140929175151 dot GC6927 at adacore dot com>
- Reply-to: <lgustavo at codesourcery dot com>
On 09/29/2014 02:51 PM, Joel Brobecker wrote:
Hmm. So when the data abort triggers at fault+8, the instruction
that triggered the abort hasn't actually completed, right? No memory
has changed yet.
So if nothing does the adjustment, like Gareth found out happens with
the Black Magic Probe, then we'll resume execution from the
wrong address/instruction (with the effects of the skipped instructions
missing, including the memory write...). Did I understand that
right? (Gareth, is that what you see?)
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...
From previous mails, it does not seem to be correct for Linux, where
the ptrace interface adjusts the data fault address to point to the
address of the instruction that caused the trigger. So it looks like the
current behavior of GDB is correct for Linux, though it may not be
correct for QEMU or bare metal.