Ada testsuite failures

Joel Brobecker brobecker@adacore.com
Tue Jan 2 16:32:00 GMT 2007


[with the patch, sorry]
> (gdb) p empty
> $1 = {<text variable, no debug info>} 0x2aaaaad3d590 <gnat__sockets__empty>
> 
> 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  <brobecker@adacore.com>

	* 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
-------------- next part --------------
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;
 


More information about the Gdb mailing list