From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5620 invoked by alias); 27 Sep 2017 20:26:01 -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 3988 invoked by uid 89); 27 Sep 2017 20:26:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: gproxy2-pub.mail.unifiedlayer.com Received: from gproxy2-pub.mail.unifiedlayer.com (HELO gproxy2-pub.mail.unifiedlayer.com) (69.89.18.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 27 Sep 2017 20:25:58 +0000 Received: from cmgw3 (unknown [10.0.90.84]) by gproxy2.mail.unifiedlayer.com (Postfix) with ESMTP id 796691E0EE2 for ; Wed, 27 Sep 2017 14:25:57 -0600 (MDT) Received: from box522.bluehost.com ([74.220.219.122]) by cmgw3 with id EkRu1w00F2f2jeq01kRxGt; Wed, 27 Sep 2017 14:25:57 -0600 X-Authority-Analysis: v=2.2 cv=K/VSJ2eI c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=2JCJgTwv5E4A:10 a=20KFwNOVAAAA:8 a=0DKbIZ8ezIoTcIly_HcA:9 Received: from 75-166-0-208.hlrn.qwest.net ([75.166.0.208]:37286 helo=pokyo) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1dxIu2-003RaK-0h; Wed, 27 Sep 2017 14:25:54 -0600 From: Tom Tromey To: Pedro Alves Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFA] Change exceptions.h functions to use gdb::function_view References: <20170927165302.30177-1-tom@tromey.com> <4098e86f-d084-fb3b-ea9b-0d5565ddd930@redhat.com> Date: Wed, 27 Sep 2017 20:26:00 -0000 In-Reply-To: <4098e86f-d084-fb3b-ea9b-0d5565ddd930@redhat.com> (Pedro Alves's message of "Wed, 27 Sep 2017 20:43:20 +0100") Message-ID: <87o9pvyjlb.fsf@pokyo> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Exim-ID: 1dxIu2-003RaK-0h X-Source-Sender: 75-166-0-208.hlrn.qwest.net (pokyo) [75.166.0.208]:37286 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== X-Local-Domain: yes X-SW-Source: 2017-09/txt/msg00840.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> I'm borderline about this. I have to say that I question the value of Pedro> catch_exceptions&co, over just using TRY/CATCH + a scoped_restore(current_uiout) Pedro> in the try scope + printing the exception. A TRY/CATCH is likely to be Pedro> easier to understand and debug, I think. [...] Pedro> Did you consider this? Nope. This was actually just a preparatory patch for another const change. I can look into the change though. I agree it would be better. >> + { >> + return do_captured_thread_select (inner_uiout, tidstr); >> + }, Pedro> Note the patch has several cases of tabs vs spaces like above. Sorry about that. Was there ever a decision about not using tabs? In this case I think the problem is that Emacs isn't indenting lambdas well. Pedro> I don't think we need the casts nowadays. catch_errors takes a const Pedro> string (since the -Wwrite-strings patch). Ok. Tom