From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7955 invoked by alias); 30 Oct 2013 11:49:32 -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 7826 invoked by uid 89); 30 Oct 2013 11:49:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mms1.broadcom.com Received: from mms1.broadcom.com (HELO mms1.broadcom.com) (216.31.210.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Oct 2013 11:49:29 +0000 Received: from [10.9.208.53] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Wed, 30 Oct 2013 04:49:17 -0700 X-Server-Uuid: 06151B78-6688-425E-9DE2-57CB27892261 Received: from IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) by IRVEXCHCAS06.corp.ad.broadcom.com (10.9.208.53) with Microsoft SMTP Server (TLS) id 14.1.438.0; Wed, 30 Oct 2013 04:49:21 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) with Microsoft SMTP Server id 14.1.438.0; Wed, 30 Oct 2013 04:49:21 -0700 Received: from [10.177.73.52] (unknown [10.177.73.52]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 803A6246A6; Wed, 30 Oct 2013 04:49:19 -0700 (PDT) Message-ID: <5270F23E.7010602@broadcom.com> Date: Wed, 30 Oct 2013 11:49:00 -0000 From: "Andrew Burgess" User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: "Andrew Burgess" , "Eli Zaretskii" , palves@redhat.com cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Extra error message from update_watchpoint References: <5260FD66.7090506@broadcom.com> <52616D4B.3020209@redhat.com> <526FE5E9.3000909@broadcom.com> <83ob68dmfb.fsf@gnu.org> <526FF27B.8090209@broadcom.com> In-Reply-To: <526FF27B.8090209@broadcom.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00918.txt.bz2 On 29/10/2013 5:38 PM, Andrew Burgess wrote: > On 29/10/2013 5:19 PM, Eli Zaretskii wrote: >>> Date: Tue, 29 Oct 2013 16:44:25 +0000 >>> From: "Andrew Burgess" >>> cc: "Pedro Alves" >>> >>> diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c >>> index 608463d..68b348d 100644 >>> --- a/gdb/breakpoint.c >>> +++ b/gdb/breakpoint.c >>> @@ -1805,7 +1805,8 @@ update_watchpoint (struct watchpoint *b, int reparse) >>> if (b->base.ops->works_in_software_mode (&b->base)) >>> b->base.type = bp_watchpoint; >>> else >>> - error (_("Software read/access watchpoints not supported.")); >>> + error (_("Hardware watchpoint support disabled. " >>> + "See set/show can-use-hw-watchpoints.")); >> >> Sorry for chiming in late, but IMO this change is a step backwards: >> the new warning is much more puzzling than the old one. The old one >> at least told what was the problem, the new one looks like entirely >> unrelated (unless you are privy to GDB internals). OK, here are a few alternatives, feel free to pick your favourites: (1) The original: error (_("Software read/access watchpoints not supported.")); (2) Pedro's original replacement: error (_("Hardware watchpoint support disabled. " "See set/show can-use-hw-watchpoints.")); (3) The original + why we can't use H/W watchpoints (bit long): error (_("Software read/access watchpoints not supported, " "re-enable hardware watchpoints using " "\"set can-use-hw-watchpoints 1\"")); (4) Same, but with a newline to keep it under 80 chars, not sure if multi-line errors are acceptable though. error (_("Software read/access watchpoints not supported.\n" "Enable hardware watchpoints using " "\"set can-use-hw-watchpoints 1\"")); (5) Mention that H/W watchpoints are disabled, but not how to re-enable them, though given the user has done the disabling this might be enough to prompt them. This is single line, and just under 80 chars. error (_("Software read/access watchpoints not supported, " "hardware watchpoints disabled.")); My favourite is (5) at the moment, but I'll take whatever makes everyone else happy :) Cheers, Andrew