This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] [testsuite] Probe awatch/rwatch support
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Fri, 17 Apr 2015 10:34:01 +0100
- Subject: Re: [PATCH] [testsuite] Probe awatch/rwatch support
- Authentication-results: sourceware.org; auth=none
- References: <1429011949-28215-1-git-send-email-qiyaoltc at gmail dot com> <552D2BC6 dot 5060109 at redhat dot com>
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 (éå)