From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7921 invoked by alias); 30 Jul 2013 19:14:36 -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 7896 invoked by uid 89); 30 Jul 2013 19:14:35 -0000 X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 30 Jul 2013 19:14:35 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6UJERgl027221 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Jul 2013 15:14:27 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r6UJEQjg025550; Tue, 30 Jul 2013 15:14:26 -0400 Message-ID: <51F81092.4050003@redhat.com> Date: Tue, 30 Jul 2013 19:14:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Andrew Burgess CC: gdb-patches@sourceware.org Subject: Re: [PATCH 2/4] Remove deprecated_throw_reason from mips_error. References: <51F7E51E.3070807@broadcom.com> <51F7E5A4.5090106@broadcom.com> In-Reply-To: <51F7E5A4.5090106@broadcom.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00791.txt.bz2 On 07/30/2013 05:11 PM, Andrew Burgess wrote: > Removes use of deprecated_throw_reason from mips_error. The user will now > see the extra "Remote debugging terminated" error message but that doesn't > feel too bad to me, what do you think? > > OK to apply? > > Thanks, > Andrew > > gdb/ChangeLog > > 2013-07-30 Andrew Burgess > > * remote-mips.c (mips_error): Replace use of deprecated_throw_reason > with throw_error. > > diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c > index 1619622..791aa8a 100644 > --- a/gdb/remote-mips.c > +++ b/gdb/remote-mips.c > @@ -510,7 +510,7 @@ mips_error (char *string,...) > if (!ptid_equal (inferior_ptid, null_ptid)) > target_mourn_inferior (); > > - deprecated_throw_reason (RETURN_ERROR); > + throw_error (GENERIC_ERROR, "Remote debugging terminated"); Throw TARGET_CLOSE_ERROR instead. Add i18n, and period at end of sentence. Okay with that change. 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... -- Pedro Alves