From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17802 invoked by alias); 31 Jul 2013 15:37:59 -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 17793 invoked by uid 89); 31 Jul 2013 15:37:59 -0000 X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_MED,RCVD_IN_HOSTKARMA_W,RDNS_NONE autolearn=ham version=3.3.1 Received: from Unknown (HELO mms1.broadcom.com) (216.31.210.17) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 31 Jul 2013 15:37:58 +0000 Received: from [10.9.208.57] by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Wed, 31 Jul 2013 08:33:56 -0700 X-Server-Uuid: 06151B78-6688-425E-9DE2-57CB27892261 Received: from IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.1.438.0; Wed, 31 Jul 2013 08:37:45 -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, 31 Jul 2013 08:37:44 -0700 Received: from [10.177.72.91] (unknown [10.177.72.91]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 1302FF2D76; Wed, 31 Jul 2013 08:37:43 -0700 (PDT) Message-ID: <51F92F47.70609@broadcom.com> Date: Wed, 31 Jul 2013 15:37:00 -0000 From: "Andrew Burgess" User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: gdb-patches@sourceware.org cc: "Pedro Alves" Subject: Re: [PATCH 2/4] Remove deprecated_throw_reason from mips_error. References: <51F7E51E.3070807@broadcom.com> <51F7E5A4.5090106@broadcom.com> <51F81092.4050003@redhat.com> <51F904AB.3070007@broadcom.com> <51F922B6.4090200@redhat.com> In-Reply-To: <51F922B6.4090200@redhat.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00825.txt.bz2 On 31/07/2013 3:44 PM, Pedro Alves wrote: > On 07/31/2013 01:35 PM, Andrew Burgess wrote: >> On 30/07/2013 8:14 PM, Pedro Alves wrote: >> >>> I'd suggest removing or merging the earlier printf_unfiltered with >>> the error message, they're a bit redundant, and having the text >>> in the error is better in that a frontend usually displays errors >>> in a special way (a messagebox or some such), while console prints >>> end up hidden in the console... >> >> So, following the advice in your second paragraph I've got a new patch >> below, given that it's totally different to the first I'm reposting for >> a review before committing. > > Thanks. > >> The only testing I've done of this code is to compile it >> (--enable-targets=all), then add in a fake call to mips_error >> and check that the output looks reasonable. > > I think that's good enough. One would hope that whoever still uses > this target tests it routinely. > >> I've removed the use of error_pre_print given that all the output >> is now passing through throw_verror, I assume that does the "correct" >> thing, though interestingly I notice that error_pre_print, and >> quit_pre_print are no longer used anywhere after this patch.... > > Interesting. Time to garbage collect them, then. > >> - deprecated_throw_reason (RETURN_ERROR); >> + status = asprintf (&fmt, "Ending remote MIPS debugging: %s", string); > > Can you add i18n/_(), while at it? > > Don't use asprintf, use xstrprintf instead. (The ARI would complain). > But, this is just concatenating the strings, so: > > fmt = concat (_("Ending remote MIPS debugging: "), > string, (char *) NULL); > make_cleanup (xfree, fmt); > > ... is even simpler. concat never returns NULL. > > OK with that change. Committed with the changes you requested. Thanks, Andrew