From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61617 invoked by alias); 13 Feb 2019 21:49:04 -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 61234 invoked by uid 89); 13 Feb 2019 21:48:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx2.freebsd.org Received: from mx2.freebsd.org (HELO mx2.freebsd.org) (8.8.178.116) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Feb 2019 21:48:45 +0000 Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id E6A9877CA3; Wed, 13 Feb 2019 21:48:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CAC775F00; Wed, 13 Feb 2019 21:48:28 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-3.local (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id ABBE01EC57; Wed, 13 Feb 2019 21:48:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: [PATCH 00/20] Remove cleanups To: Tom Tromey , gdb-patches@sourceware.org References: <20190213212927.9474-1-tom@tromey.com> From: John Baldwin Openpgp: preference=signencrypt Message-ID: <75686c17-b637-2403-09ab-b362d85a9c04@FreeBSD.org> Date: Wed, 13 Feb 2019 21:49:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190213212927.9474-1-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0CAC775F00 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.94)[-0.945,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-IsSubscribed: yes X-SW-Source: 2019-02/txt/msg00208.txt.bz2 On 2/13/19 1:29 PM, Tom Tromey wrote: > This series removes the remaining uses of make_cleanup from the tree, > then removes make_cleanup and some related functions (but note that > final cleanups remain). > > Then, it removes the TRY/CATCH macros in favor of ordinary C++ code. > > Finally, it cleans up a few spots that currently use TRY/CATCH but > that are more succinctly written using SCOPE_EXIT or RAII. > > Regression tested by the buildbot. Yay! The only comment I have is that the structure names for exceptions look a bit awkward in code now with the mix of lower and upper case, e.g.: try { e_msg = ada_exception_message_1 (); } catch (struct gdb_exception_RETURN_MASK_ERROR &e) { e_msg.reset (nullptr); } We could drop the 'struct' perhaps, but not sure if we could simplify the classes a bit to something like: struct gdb_exception_error : public gdb_exception { }; struct gdb_exception_quit : public gdb_exception { }; And use 'gdb_execption' instead of 'struct gdb_exception_RETURN_MASK_ALL', 'gdb_exception_error' instead of 'struct gdb_exception_RETURN_MASK_ERROR', and 'gdb_exception_quit' instead of 'struct gdb_exception_RETURN_MASK_QUIT'? -- John Baldwin                                                                            Â