From: Pedro Alves <palves@redhat.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>,
Joel Brobecker <brobecker@adacore.com>
Cc: Craig Blackmore <craig.blackmore@embecosm.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH] RISC-V: enable have_nonsteppable_watchpoint by default
Date: Mon, 08 Oct 2018 11:56:00 -0000 [thread overview]
Message-ID: <4c4c1369-0f5c-549a-ed82-51563c5e6dd6@redhat.com> (raw)
In-Reply-To: <20181008095839.GC5952@embecosm.com>
On 10/08/2018 10:58 AM, Andrew Burgess wrote:
> * Joel Brobecker <brobecker@adacore.com> [2018-10-03 15:37:03 -0700]:
>
>> Hi Craig, hi Andrew,
>>
>>> ---
>>>
>>> The RISC-V debug spec 0.13 recommends that write triggers fire before the
>>> write is committed. If the target follows this behaviour, then
>>> have_nonsteppable_watchpoint needs to be set to 'on' so that GDB will step
>>> over the watchpoint before checking if the value has changed.
>>>
>>> This patch adds a setshow for have_nonsteppable_watchpoint which defaults
>>> to 'on' to match the recommended behaviour. If a target does not follow
>>> this timing, then 'set riscv have_nonsteppable_watchpoint off' will need
>>> to be issued on the command line.
>>>
>>> gdb/ChangeLog:
>>>
>>> * riscv-tdep.c (set_have_nonsteppable_watchpoint): Add callback
>>> for 'set riscv have_nonsteppable_watchpoint'.
>>> (show_have_nonsteppable_watchpoint): Add callback for
>>> 'show riscv have_nonsteppable_watchpoint'.
>>> (riscv_gdbarch_init): Initialise gdbarch setting for
>>> have_nonesteppable_watchpoint.
>>
>> I assume this patch is waiting for review from Andrew?
>
> No, I was hoping for some feedback from Pedro, he commented in this
> post:
> https://sourceware.org/ml/gdb-patches/2018-09/msg00570.html
Sorry, replied now.
> that he wasn't happy with the approach Craig took. He would like to
> see the switching done automatically from the target description. In
> this post:
> https://sourceware.org/ml/gdb-patches/2018-09/msg00572.html
>
> I agree with Pedro, but take the position that as riscv doesn't
> currently have any target description support (I hope to work on some
> of this soon) then I'd like this patch to go in as it is and improve
> on it later.
>
> However, as Pedro is a global maintainer, I don't feel I can OK the
> patch with his negative feedback outstanding...
Sorry, I don't mean to hold people back, but indeed I haven't managed
to be very responsive in the last few weeks...
There are a number of issues with the patch as is. Off hand:
#1 - Missing NEWS.
#2 - Missing manual/docs change.
#3 - set_have_nonsteppable_watchpoint works on whatever's
the current inferior's gdbarch, so it means that if
you're running a --enable-targets=all gdb against
something non-RISC-V, the command will affect that
architecture.
#4 - OTOH, the command is documented as a RISC-V command. But it's
in the global "set" namespace right? Not something like
"set riscv have-nonsteppable-watchpoint"?
#5 - I think "have-nonsteppable-watchpoint" is a bad user-facing
name. It is exposing outdated gdb-internal lingo ("nonsteppable").
The property in question is whether the watchpoint triggers
before or after the instruction is executed. How that
translates to "nonsteppable" for users is going to be quite
cryptic.
The above, keeping in mind that it'd be much better for GDB to figure
this stuff out itself, and coupled with the fact that I'm not sure
whether there are in fact implementations of riscv that trigger
watchpoints after the write, makes me wonder, do we really need this?
Thanks,
Pedro Alves
next prev parent reply other threads:[~2018-10-08 11:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-16 0:13 Craig Blackmore
2018-09-17 10:34 ` Andrew Burgess
2018-09-24 11:36 ` Craig Blackmore
2018-10-03 22:37 ` Joel Brobecker
2018-10-04 16:26 ` Craig Blackmore
2018-10-08 9:58 ` Andrew Burgess
2018-10-08 11:56 ` Pedro Alves [this message]
2018-10-08 14:25 ` Joel Brobecker
2018-10-08 14:37 ` Paul Koning
2018-10-08 14:42 ` Pedro Alves
2018-10-08 14:51 ` Joel Brobecker
2018-10-09 17:20 ` Craig Blackmore
2018-10-09 17:29 ` Paul Koning
2018-10-09 17:39 ` Pedro Alves
2018-10-23 10:34 ` Andrew Burgess
2018-10-08 14:50 ` Andreas Schwab
2018-09-17 12:54 ` Pedro Alves
2018-09-17 13:34 ` Andrew Burgess
2018-10-08 11:29 ` Pedro Alves
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=4c4c1369-0f5c-549a-ed82-51563c5e6dd6@redhat.com \
--to=palves@redhat.com \
--cc=andrew.burgess@embecosm.com \
--cc=brobecker@adacore.com \
--cc=craig.blackmore@embecosm.com \
--cc=gdb-patches@sourceware.org \
/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