From: Yao Qi <qiyaoltc@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: Yao Qi <qiyaoltc@gmail.com>,
Jan Kratochvil <jan.kratochvil@redhat.com>,
gdb-patches@sourceware.org
Subject: Re: [patch] aarch64: PR 19806: watchpoints: false negatives -> false positives
Date: Fri, 10 Jun 2016 08:11:00 -0000 [thread overview]
Message-ID: <86k2hxv4xx.fsf@gmail.com> (raw)
In-Reply-To: <380b5288-f46f-3e20-c9c3-8cc8738ee322@redhat.com> (Pedro Alves's message of "Wed, 8 Jun 2016 19:46:35 +0100")
Pedro Alves <palves@redhat.com> writes:
> So I'm now thinking that the best is to extend the RSP somehow.
>
I think it is a good idea to extend the RSP...
> I think that my preference is for the target to report a
> memory range instead of a single address in the watchpoint
> stop reply. Like, e.g., if an access to address 10000006 triggers,
> but all the target knows is that some address between 10000004
> and 10000008 was accessed, it reports:
>
> T05 watch:10000004-10000008
>
> instead of:
>
> T05 watch:10000006
>
> ( or maybe T05 watch:10000004;watch-end:10000008 )
>
> This should be easy to implement in the target side, and
> is practically stateless (a stub that just forwards requests
> to a lower level debug api doesn't have to remember
> the addresses gdb requested).
>
Right.
> Then the corresponding target methods in gdb would work with an
> address range instead of a single address too. E.g.,
> target_watchpoint_addr_within_range would be replaced by
> a range overlap check.
>
> If the target knows the process stopped for a watchpoint, but
> doesn't know the address that triggered, then it could report
> the whole address space as range:
>
> T05 watch:00000000-ffffffff
>
> Note that it's not possible currently for a remote stub to tell gdb
> that it doesn't know the address that trapped, even though the
> target_ops:target_stopped_data_address method supports
> returning false, and some native targets do make use of it.
>
> Alternatively, since we're extending the packet anyway, we
> can make the address optional, thus making these equivalent:
>
> T05 watch:00000000-ffffffff
> T05 watch:
I prefer the latter, T05 watch:.
> Alternatively, I though we could add a new qSupported feature value
> that informs gdb of what is the watchpoint alignment and size
> restriction, but I'm not so keen on that since the alignment
> restriction may depend on mode (e.g., 32-bit vs 64-bit inferior),
> or on the size of the area being watched, or some more complicated rule.
Yes, there are different watchpoint alignment restrictions on arm and
aarch64.
--
Yao (齐尧)
next prev parent reply other threads:[~2016-06-10 8:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 8:00 Jan Kratochvil
2016-06-07 13:23 ` Yao Qi
2016-06-07 13:41 ` Pedro Alves
2016-06-07 15:25 ` Yao Qi
2016-06-07 16:04 ` Pedro Alves
2016-06-08 16:42 ` Yao Qi
2016-06-08 17:54 ` Pedro Alves
2016-06-08 18:46 ` Pedro Alves
2016-06-10 8:11 ` Yao Qi [this message]
2016-06-19 18:29 ` Jan Kratochvil
2016-06-20 11:47 ` Pedro Alves
2016-06-20 14:12 ` Jan Kratochvil
2016-06-20 14:40 ` Pedro Alves
2017-03-27 21:11 ` obsolete: " Jan Kratochvil
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=86k2hxv4xx.fsf@gmail.com \
--to=qiyaoltc@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=palves@redhat.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