Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>, Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] aarch64: PR 19806: watchpoints: false negatives -> false positives
Date: Tue, 07 Jun 2016 13:41:00 -0000	[thread overview]
Message-ID: <48622de4-dc45-c48f-7172-495b669f2334@redhat.com> (raw)
In-Reply-To: <86eg89w2sr.fsf@gmail.com>

On 06/07/2016 02:23 PM, Yao Qi wrote:

> this leads me thinking that why do we need to get "inaccurate address"
> from target_stopped_data_address, and pass it to
> target_watchpoint_addr_within_range.  Instead, we can pass the
> watchpoint to the (new) target hook, and set
> watchpoint.watchpoint_triggered in different target implementations.  In
> each target implementation, we can set .watchpoint_triggered to
> watch_triggered_{yes,no,unknown} according to its hardware feature or
> capability.
> 
> I'll give a try this way.

How do you plan on handling remote targets though?  Done that way, it 
sounds to me like the alignment restrictions should either be a gdbarch
property, or you need some RSP extension, e.g., extend the "watch" stop
reply to indicate an stop data address range instead of a sole address,
or make the stub report back the alignment restriction when GDB tells it
to insert the watchpoint in the first place, instead of just saying "OK".

A gdbarch method poses problems for remote stubs that are actually emulators,
and thus can support hardware watchpoints without these restrictions.
I think it's actually problematic for real machines, as the restrictions
will often depend on process revisions/models.  So a gdbarch approach
would be undesirable, IMO.

An RSP extension approach would work, though exactly because it
needs some extension, I'm not sure is worth it.

See:

 https://sourceware.org/bugzilla/show_bug.cgi?id=19806#c1

Thanks,
Pedro Alves


  reply	other threads:[~2016-06-07 13:41 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 [this message]
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
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=48622de4-dc45-c48f-7172-495b669f2334@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=qiyaoltc@gmail.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