From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73198 invoked by alias); 2 Apr 2019 22:07:44 -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 73187 invoked by uid 89); 2 Apr 2019 22:07:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1440, HTo:U*tom, sk:catcher, TRY X-HELO: mail-wr1-f66.google.com Received: from mail-wr1-f66.google.com (HELO mail-wr1-f66.google.com) (209.85.221.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Apr 2019 22:07:43 +0000 Received: by mail-wr1-f66.google.com with SMTP id j9so18600323wrn.6 for ; Tue, 02 Apr 2019 15:07:42 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id f1sm10551477wrt.87.2019.04.02.15.07.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 15:07:40 -0700 (PDT) Subject: Re: [PATCH v2 14/22] Simplify exception handling To: Tom Tromey , gdb-patches@sourceware.org References: <20190227201849.32210-1-tom@tromey.com> <20190227201849.32210-15-tom@tromey.com> From: Pedro Alves Message-ID: Date: Tue, 02 Apr 2019 22:07:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190227201849.32210-15-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-04/txt/msg00014.txt.bz2 On 02/27/2019 08:18 PM, Tom Tromey wrote: > Now that cleanups have been removed, TRY/CATCH can't be SJLJ-based any > more. This patch simplifies the exception handling code, by removing > the non-working variants. > > Note that the "pure" C++ exception handling code is removed as well; That's fine, if we're getting rid of TRY/CATCH. That mode is/was useful to catch issues like these: https://sourceware.org/ml/gdb-patches/2017-10/msg00080.html but if we're getting rid of TRY/CATCH, then it won't be needed anymore, of course. > I > think the route forward must be to change exceptions to be > self-destructing, so that try_scope_depth can simply be removed. Agreed. > > Some longjmp-based code remains, as it is needed to throw an exception > through readline. > > gdb/ChangeLog > 2019-02-27 Tom Tromey > > * common/common-exceptions.h (GDB_XCPT_SJMP, GDB_XCPT_TRY) > (GDB_XCPT_RAW_TRY, GDB_XCPT): Remove. > (TRY, CATCH, END_CATCH): Remove some definitions. > * common/common-exceptions.c: Don't use GDB_XCPT. > (catcher_list_size): Remove. > (throw_exception, throw_it): Simplify. Looks fine. I spotted a few comments that need updating, even after the whole series is in, but no need to stress about it. It's fine to tackle it with a final pass after the series. I have comments for the other patches, will send them as soon as possible. Thanks, Pedro Alves