This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] RISC-V: enable have_nonsteppable_watchpoint by default
- From: Pedro Alves <palves at redhat dot com>
- To: Craig Blackmore <craig dot blackmore at embecosm dot com>, gdb-patches at sourceware dot org
- Date: Mon, 17 Sep 2018 13:54:38 +0100
- Subject: Re: [PATCH] RISC-V: enable have_nonsteppable_watchpoint by default
- References: <c83e39fb-b1e8-cc67-85b5-c7cc66197078@embecosm.com>
On 09/16/2018 01:13 AM, Craig Blackmore wrote:
> 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 1 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 1 to match the recommended behaviour. If a target does not follow
> this timing, then 'set riscv have_nonsteppable_watchpoint 0' 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'
> (riscv_gdbarch_init): initialise gdbarch setting for
> have_nonesteppable_watchpoint
This is something the target/stub knows, right? I'd be much
better to make this automatic, so that users wouldn't have to
know to tweak anything.
Thanks,
Pedro Alves