From: Pedro Alves <palves@redhat.com>
To: Terry Guo <terry.guo@arm.com>,
Marcus Shawcroft <marcus.shawcroft@arm.com>
Cc: lgustavo@codesourcery.com, Joel Brobecker <brobecker@adacore.com>,
Yao Qi <yao@codesourcery.com>,
gdb-patches@sourceware.org
Subject: Re: [RFA/commit] arm-tdep.c: Do not single-step after hitting a watchpoint.
Date: Tue, 16 Sep 2014 15:21:00 -0000 [thread overview]
Message-ID: <5418556E.7010502@redhat.com> (raw)
In-Reply-To: <54183681.3010504@codesourcery.com>
Hi Terry, Marcus,
Can someone at ARM shed some light on this, please?
This thread is here:
https://sourceware.org/ml/gdb-patches/2014-09/msg00498.html
And the discussion started in another thread here:
https://sourceware.org/ml/gdb/2014-09/msg00000.html
I've just added a test that hopefully helps with this, btw:
https://sourceware.org/ml/gdb-patches/2014-09/msg00535.html
I'm also wondering whether Aarch64 needs adjustment as well.
Thanks,
Pedro Alves
On 09/16/2014 02:09 PM, Luis Machado wrote:
> On 09/16/2014 09:48 AM, Joel Brobecker wrote:
>>>> I think the experiments that were run showed that QEMU is in fact
>>>> correct and should NOT be changed.
>>>
>>> Do we know what the Linux kernel's behavior on this one is? I wonder
>>> what the stopped data address shows.
>>>
>>> Someone with access to a board with a relatively new kernel could
>>> try that and rule it out, otherwise we risk fixing something for
>>> QEMU/bare metal and breaking things for Linux.
>>
>> When I tested on GNU/Linux, watchpoints simply did not work
>> (silently ignored, no signal). I was using an old kernel (2012),
>> though; but that's all I had access to. But, all in all, baremetal
>> should be our most reliable source of info, though,no? - no software
>> layer to murky the waters.
>>
>
> It is hard to tell. ARM's documentation is not clear. For example, this
> is probably where the stopped data address should be coming from:
>
> --
>
> WFAR - Watchpoint Fault Address Register
>
> The WFAR is updated to indicate the address of the instruction that
> accessed the watchpointed address:
>
> - the address of the instruction + 8 in ARM state
> - the address of the instruction + 4 in Thumb® state
>
> --
>
> So it seems in line with what we are seeing? The program being trapped
> two instructions after the data fault?
>
> If it stops just a single instruction after the data fault, then someone
> (probe, emulator or kernel) may be trying to help GDB by decrementing
> the data fault address.
>
> Luis
>
next prev parent reply other threads:[~2014-09-16 15:21 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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
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=5418556E.7010502@redhat.com \
--to=palves@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=lgustavo@codesourcery.com \
--cc=marcus.shawcroft@arm.com \
--cc=terry.guo@arm.com \
--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