From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88699 invoked by alias); 26 Dec 2018 15:50:36 -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 88674 invoked by uid 89); 26 Dec 2018 15:50:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.6 required=5.0 tests=BAYES_00,GIT_PATCH_2,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=b, B X-HELO: mailsec117.isp.belgacom.be Received: from mailsec117.isp.belgacom.be (HELO mailsec117.isp.belgacom.be) (195.238.20.113) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Dec 2018 15:50:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1545839431; x=1577375431; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=BYDoCD8dLgmFLQP2OoXA2xHzaHM6TGUgPYa7v05LV5M=; b=AcyozPNr7ANoykWlUx6J2CMUNZIT3fDBmajRIznvgXkMfexyj6Gl4sWh gRYugCYWI9rUZ29+snf8lM2A9UIF/g==; Received: from 184.205-67-87.adsl-dyn.isp.belgacom.be (HELO md) ([87.67.205.184]) by relay.skynet.be with ESMTP/TLS/AES256-GCM-SHA384; 26 Dec 2018 16:50:29 +0100 Message-ID: <1545839429.31031.15.camel@skynet.be> Subject: Re: [RFAv2 2/4] Fix gdb.ada/rename_subscript_param.exp by using more unique names. From: Philippe Waroquiers To: Joel Brobecker Cc: gdb-patches@sourceware.org Date: Wed, 26 Dec 2018 15:50:00 -0000 In-Reply-To: <20181226152743.GD21851@adacore.com> References: <20181226140304.19594-1-philippe.waroquiers@skynet.be> <20181226140304.19594-3-philippe.waroquiers@skynet.be> <20181226152743.GD21851@adacore.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00333.txt.bz2 On Wed, 2018-12-26 at 19:27 +0400, Joel Brobecker wrote: > On Wed, Dec 26, 2018 at 03:03:02PM +0100, Philippe Waroquiers wrote: > > The test fails due to conflict between boolean 'b'and some 'b' in atnat.h: > > > > (gdb) print b > > Multiple matches for b > > [0] cancel > > [1] b at ../sysdeps/ieee754/dbl-64/atnat.h:106 > > [2] b at ../sysdeps/ieee754/dbl-64/atnat.h:106 > > [3] b at ../sysdeps/ieee754/dbl-64/atnat.h:106 > > > FAIL: gdb.ada/rename_subscript_param.exp: print b before changing its value (timeout) > > > > Fix by renaming 'b' to 'rename_subscript_param_b. > > To me, the way this patch is explained is a little misleading > ("the fix"). I would explain instead why you are getting this > multiple-choice question, and why you are electing to rename > the entity... What about this new commit message ? -------------------------------------------------- Improve gdb.ada/rename_subscript_param.exp by using more unique names. With old compilers, the test fails because no debug info is generated for 'B' and GDB finds some 'b' in atnat.h: (gdb) print b Multiple matches for b [0] cancel [1] b at ../sysdeps/ieee754/dbl-64/atnat.h:106 [2] b at ../sysdeps/ieee754/dbl-64/atnat.h:106 [3] b at ../sysdeps/ieee754/dbl-64/atnat.h:106 > FAIL: gdb.ada/rename_subscript_param.exp: print b before changing its value (timeout) Avoid the timeout by renaming 'b' to rename_subscript_param_b. Also, change 'before' to 'after' in the gdb_test message that prints the value after changing it. The test still fails with old compilers that do not properly generate debug info for this renaming: (gdb) print rename_subscript_param_b No definition of "rename_subscript_param_b" in current context. (gdb) FAIL: gdb.ada/rename_subscript_param.exp: print rename_subscript_param_b before changing its value Note: if the compiler would generate the correct debug info, the test should succeed with the name B.  However, waiting for this fix, changing the name ensures that the test fails directly, instead of causing a timeout. 2018-12-26  Philippe Waroquiers   PR ada/23381 * gdb.ada/rename_subscript_param/pkg.adb (B): Rename to Rename_Subscript_Param_B.  All users updated. gdb.ada/rename_subscript_param.exp: Test names made unique. Note that PR ada/23381 is only fully fixed when using a recent compiler. > > > Also, change 'before' to 'after' in the gdb_test message that prints > > the value after changing it. > > The test however still fails for me, probably because the Debian stable > > Ada compiler is too old, and does not properly generate debug info for > > this renamining: > > (gdb) print rename_subscript_param_b > > No definition of "rename_subscript_param_b" in current context. > > (gdb) FAIL: gdb.ada/rename_subscript_param.exp: print rename_subscript_param_b before changing its value > > > > Note: if the compiler would generate the correct debug info, the test should > > succeed with the name B. However, waiting for this fix, changing the name > > ensures that the test fails directly, instead of causing a timeout. > > > > 2018-12-26 Philippe Waroquiers > > > > * gdb.ada/rename_subscript_param/pkg.adb (B): Rename to > > Rename_Subscript_Param_B. All users updated. > > The patch itself looks good, though. >