From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50326 invoked by alias); 17 Apr 2015 09:34:14 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 50311 invoked by uid 89); 17 Apr 2015 09:34:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f176.google.com Received: from mail-pd0-f176.google.com (HELO mail-pd0-f176.google.com) (209.85.192.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 17 Apr 2015 09:34:12 +0000 Received: by pdbqd1 with SMTP id qd1so122826695pdb.2 for ; Fri, 17 Apr 2015 02:34:11 -0700 (PDT) X-Received: by 10.66.232.134 with SMTP id to6mr3855654pac.96.1429263251120; Fri, 17 Apr 2015 02:34:11 -0700 (PDT) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by mx.google.com with ESMTPSA id q4sm9549485pdo.42.2015.04.17.02.34.09 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 17 Apr 2015 02:34:10 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: Yao Qi , gdb-patches@sourceware.org Subject: Re: [PATCH] [testsuite] Probe awatch/rwatch support References: <1429011949-28215-1-git-send-email-qiyaoltc@gmail.com> <552D2BC6.5060109@redhat.com> Date: Fri, 17 Apr 2015 09:34:00 -0000 In-Reply-To: <552D2BC6.5060109@redhat.com> (Pedro Alves's message of "Tue, 14 Apr 2015 16:01:26 +0100") Message-ID: <86oamnrtdi.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00646.txt.bz2 Pedro Alves 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 repar= se) > 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) > + =3D=3D 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 e= xpression 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 e= xpression 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. --=20 Yao (=E9=BD=90=E5=B0=A7)