This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [testsuite] Probe awatch/rwatch support


Pedro Alves <palves@redhat.com> writes:

Hi Pedro,
Your patch fixes some fails, but following piece causes a regression

> diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
> index 96d2a14..aa7bc02 100644
> --- a/gdb/breakpoint.c
> +++ b/gdb/breakpoint.c
> @@ -2104,6 +2104,10 @@ update_watchpoint (struct watchpoint *b, int reparse)
>  	      if (!can_use_hw_watchpoints)
>  		error (_("Can't set read/access watchpoint when "
>  			 "hardware watchpoints are disabled."));
> +	      else if (target_can_use_hardware_watchpoint (b->base.type, 1, 0)
> +		       == 0)
> +		error (_("Target does not support this type of "
> +			 "hardware watchpoint."));
>  	      else
>  		error (_("Expression cannot be implemented with "
>  			 "read/access watchpoint."));

rwatch $pc^M
Target does not support this type of hardware watchpoint.^M
(gdb) FAIL: gdb.base/watchpoint.exp: rwatch disallowed for register based expression

without your patch, it is:

rwatch $pc^M
Expression cannot be implemented with read/access watchpoint.^M
(gdb) PASS: gdb.base/watchpoint.exp: rwatch disallowed for register based expression

I've already had a fix to the regression, that is, return more
information from can_use_hardware_watchpoint, so that the caller
(update_watchpoint) can emit sensible errors accordingly.  The patch
looks ugly, so still need some time to improve it.  In the meantime,
other bits of your patch is still very useful, and fixes some fails
without any regressions.  I'll post them out first.

-- 
Yao (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]