From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23698 invoked by alias); 18 May 2012 16:10:53 -0000 Received: (qmail 23684 invoked by uid 22791); 18 May 2012 16:10:51 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 May 2012 16:10:35 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4IGAC62013967 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 18 May 2012 12:10:12 -0400 Received: from host2.jankratochvil.net (ovpn-116-17.ams2.redhat.com [10.36.116.17]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q4IGA8K7024170 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 18 May 2012 12:10:11 -0400 Date: Fri, 18 May 2012 16:10:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: Tom Tromey , gdb-patches@sourceware.org Subject: gdb.base/print-file-var.exp false PASS [Re: [RFA] choose symbol from given block's objfile first.] Message-ID: <20120518161008.GA24465@host2.jankratochvil.net> References: <1336430581-11262-1-git-send-email-brobecker@adacore.com> <874nrqvbeh.fsf@fleche.redhat.com> <20120509190529.GI15555@adacore.com> <20120509190753.GA31769@adacore.com> <20120509214758.GQ15555@adacore.com> <20120509214856.GA8314@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120509214856.GA8314@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2012-05/txt/msg00692.txt.bz2 On Wed, 09 May 2012 23:48:56 +0200, Joel Brobecker wrote: > +++ b/gdb/testsuite/gdb.base/print-file-var-lib1.c [..] > +int this_version_id = 104; > + > +int > +get_version_1 (void) > +{ > + return this_version_id; > +} [...] > +++ b/gdb/testsuite/gdb.base/print-file-var-lib2.c [...] > +int this_version_id = 203; > + > +int > +get_version_2 (void) > +{ > + return this_version_id; > +} [...] > +++ b/gdb/testsuite/gdb.base/print-file-var-main.c [...] > +int > +main (void) > +{ > + if (get_version_1 () != 104) > + return 1; > + if (get_version_2 () != 104) > + return 2; > + return 0; > +} [...] > +++ b/gdb/testsuite/gdb.base/print-file-var.exp [...] > +gdb_test "print 'print-file-var-lib1.c'::this_version_id" \ > + " = 104" > + > +gdb_test "print 'print-file-var-lib2.c'::this_version_id" \ > + " = 203" This testcase proves GDB behaves incorrectly - if the code sees 104 in both cases then GDB should also print 104 in both cases. I am curious why did you check it in when you have proven yourself the regression. Regards, Jan