From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31051 invoked by alias); 30 Jul 2013 19:08:19 -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 31041 invoked by uid 89); 30 Jul 2013 19:08:18 -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:08:18 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6UJ8952001734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Jul 2013 15:08:10 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r6UJ88Rt018523; Tue, 30 Jul 2013 15:08:09 -0400 Message-ID: <51F80F18.8070805@redhat.com> Date: Tue, 30 Jul 2013 19:08: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 1/4] Remove deprecated_throw_reason from internal_verror. References: <51F7E51E.3070807@broadcom.com> <51F7E573.6040001@broadcom.com> In-Reply-To: <51F7E573.6040001@broadcom.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-07/txt/msg00790.txt.bz2 On 07/30/2013 05:10 PM, Andrew Burgess wrote: > Removes the use of deprecated_throw_reason from internal_verror. The user > will now get an extra "Command aborted" error message in the case where gdb > hits an internal error, and the user decides not to quit. This feels like > an improvement to me as it /might/ not be obvious that choosing to continue > the session will still drop you out of whatever command you were attempting > at the time. What do you think? ... > diff --git a/gdb/utils.c b/gdb/utils.c > index 01212ab..a4ce01c 100644 > --- a/gdb/utils.c > +++ b/gdb/utils.c > @@ -831,7 +831,7 @@ void > internal_verror (const char *file, int line, const char *fmt, va_list ap) > { > internal_vproblem (&internal_error_problem, file, line, fmt, ap); > - deprecated_throw_reason (RETURN_ERROR); > + throw_error (GENERIC_ERROR, _("Command aborted")); That error can still be swallowed by a TRY_CATCH somewhere, and the command might proceed. I think we should throw a RETURN_QUIT instead, which has exactly that semantic of cancelling the ongoing command. IOW, I think this should call "fatal" instead. -- Pedro Alves