From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 105703 invoked by alias); 7 Aug 2018 16:26:33 -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 105686 invoked by uid 89); 7 Aug 2018 16:26:32 -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,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: EUR03-VE1-obe.outbound.protection.outlook.com Received: from mail-eopbgr50070.outbound.protection.outlook.com (HELO EUR03-VE1-obe.outbound.protection.outlook.com) (40.107.5.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Aug 2018 16:26:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FioI7UncCVrOkoz+QXfJ+xC3QKPxkBr+JlDcV4FSrjk=; b=PUi0lkrkaPDz5jAYCZbQGm2pf8HILggLPVF7AL+LqxSs0DvAGNJoD4gAXFeysX85xNvIBP+0VvM7iWG7Ep7BwDJ3eGiDKE23gU07iAIQ9J9MpxsEn93FFmNRiMgFBOXoIWcE2l8kQ/0yDuro0gx1Rd32fpk1p13WietMOVzXZ8g= Received: from [10.32.36.144] (217.140.106.40) by DB7PR08MB3194.eurprd08.prod.outlook.com (2603:10a6:5:1e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.15; Tue, 7 Aug 2018 16:26:27 +0000 Subject: Re: [PATCH] Logical short circuiting with Fortran argument lists To: Tom Tromey Cc: gdb-patches@sourceware.org, nd@arm.com References: <20f669fe-9f31-fd39-9c3e-f2e1835576c6@arm.com> <87lg9jz55b.fsf@tromey.com> From: Richard Bunt Message-ID: <478be5c4-15c5-93e3-a55c-793557e95f9a@arm.com> Date: Tue, 07 Aug 2018 16:26: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: <87lg9jz55b.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-Path: richard.bunt@arm.com Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Richard.Bunt@arm.com; Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00119.txt.bz2 Hi Tom, Many thanks for the feedback. On 08/06/2018 08:06 PM, Tom Tromey wrote: >>>>>> "Richard" == Richard Bunt writes: > > Richard> Investigation revealed that EVAL_SKIP was not being handled correctly > Richard> for all types serviced by the OP_F77_UNDETERMINED_ARGLIST case in > Richard> evaluate_subexp_standard. While skipping an undetermined argument > Richard> list the type is resolved to be an integer (as this is what > Richard> evaluate_subexp returns when skipping) and so it was not possible to > Richard> delegate to the appropriate case (e.g. array, function call). > > While I agree with Simon that this patch is fine, I think the intended > design of eval.c is that skipped expressions should still try to return > a value of the correct type when possible. The reason for this is that > the type is still sometimes needed, for example to compute the correct > type of a ?: ternary operator, which in turn could be used for overload > resolution. This makes sense, I'll develop a new patch taking this design into account. > > Richard> While this patch allows a wider range of expressions to be evaluated, it > Richard> should be noted that this patch does not allow the skipping of arrays > Richard> which use Fortran array slicing, due to the inability of the debugger > Richard> to skip OP_RANGE. > > This sounds like a bug to me. GDB fails with a graceful error message on this class of expression e.g. p .TRUE. .OR. binary_string(1:2) "GDB does not (yet) know how to evaluate that kind of expression" So this seemed like a good place to stop to keep the patch as small and scoped as possible. To satisfy this review comment, I'll add another patch to extend the short-circuiting to include arrays with slicing. > > Tom > Thanks, Rich