From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 506 invoked by alias); 2 Jan 2007 16:32:25 -0000 Received: (qmail 498 invoked by uid 22791); 2 Jan 2007 16:32:24 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 02 Jan 2007 16:32:17 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id 6569F48CBC2 for ; Tue, 2 Jan 2007 11:32:15 -0500 (EST) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 17123-02-4 for ; Tue, 2 Jan 2007 11:32:15 -0500 (EST) Received: from takamaka.act-europe.fr (AStDenis-105-1-58-225.w80-8.abo.wanadoo.fr [80.8.155.225]) by nile.gnat.com (Postfix) with ESMTP id 63E5A48CBAE for ; Tue, 2 Jan 2007 11:32:14 -0500 (EST) Received: by takamaka.act-europe.fr (Postfix, from userid 1000) id 173C834C099; Tue, 2 Jan 2007 20:33:02 +0400 (RET) Date: Tue, 02 Jan 2007 16:32:00 -0000 From: Joel Brobecker To: gdb@sourceware.org Subject: Re: Ada testsuite failures Message-ID: <20070102163302.GL3434@adacore.com> References: <20061231194604.GA23919@nevyn.them.org> <20070102113903.GH3434@adacore.com> <20070102143926.GA10771@nevyn.them.org> <20070102163108.GJ3434@adacore.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="f2QGlHpHGjS2mn6Y" Content-Disposition: inline In-Reply-To: <20070102163108.GJ3434@adacore.com> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-01/txt/msg00017.txt.bz2 --f2QGlHpHGjS2mn6Y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1115 [with the patch, sorry] > (gdb) p empty > $1 = {} 0x2aaaaad3d590 > > Isn't that interesting - that's something completely different. There > are zero references to the string "empty" in the debug info for > null_record, so it is definitely a debugging information problem. Yes and no. The test isn't representative of "real code". It will be more productive to enhance the testcase a bit, I was very naive when I wrote this code - it must have been the reduced testcase I have been using to track down the issue, the code we have in our testsuite is a bit better that way. > Looking at the test I'm not surprised. Empty is unused; adding > something that references it is probably sufficient. Yes, I agree. Could you try the following patch? 2006-01-02 Joel Brobecker * gdb.ada/null_record/bar.ads (Do_Nothing): Add extra parameter. * gdb.ada/null_record/bar.adb (Do_Nothing): Likewise. * gdb.ada/null_record/null_record.adb: Fake use of type Empty to prevent this type from being optimized out. That should help, -- Joel --f2QGlHpHGjS2mn6Y Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="nr.diff" Content-length: 1691 Index: gdb.ada/null_record/bar.ads =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/null_record/bar.ads,v retrieving revision 1.1 diff -u -p -r1.1 bar.ads --- gdb.ada/null_record/bar.ads 3 Feb 2005 03:58:53 -0000 1.1 +++ gdb.ada/null_record/bar.ads 2 Jan 2007 16:26:19 -0000 @@ -14,10 +14,12 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +with System; + package Bar is type Empty is null record; - procedure Do_Nothing; + procedure Do_Nothing (E : System.Address); end Bar; Index: gdb.ada/null_record/bar.adb =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/null_record/bar.adb,v retrieving revision 1.1 diff -u -p -r1.1 bar.adb --- gdb.ada/null_record/bar.adb 3 Feb 2005 03:58:53 -0000 1.1 +++ gdb.ada/null_record/bar.adb 2 Jan 2007 16:26:19 -0000 @@ -16,7 +16,7 @@ package body Bar is - procedure Do_Nothing is + procedure Do_Nothing (E : System.Address) is begin null; end Do_Nothing; Index: gdb.ada/null_record/null_record.adb =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.ada/null_record/null_record.adb,v retrieving revision 1.1 diff -u -p -r1.1 null_record.adb --- gdb.ada/null_record/null_record.adb 3 Feb 2005 03:58:53 -0000 1.1 +++ gdb.ada/null_record/null_record.adb 2 Jan 2007 16:26:19 -0000 @@ -17,7 +17,8 @@ with Bar; use Bar; procedure Null_Record is + E : Empty; begin - Do_Nothing; + Do_Nothing (E'Address); end Null_Record; --f2QGlHpHGjS2mn6Y--