* gdb.ada (bar.ads, bar.adb, null_record.adb): New files.
authorJoel Brobecker <brobecker@gnat.com>
Thu, 1 Apr 2004 00:58:00 +0000 (00:58 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Thu, 1 Apr 2004 00:58:00 +0000 (00:58 +0000)
        * gdb.ada (null_record.exp): New testcase.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/bar.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/bar.ads [new file with mode: 0644]
gdb/testsuite/gdb.ada/null_record.adb [new file with mode: 0644]
gdb/testsuite/gdb.ada/null_record.exp [new file with mode: 0644]

index bec4bafe3aded6d1a39b2c4cfde0de3277e20380..a5664a39062141ad5d1c0016a8304182857ef070 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-31  Joel Brobecker  <brobecker@gnat.com>
+
+       * gdb.ada (bar.ads, bar.adb, null_record.adb): New files.
+       * gdb.ada (null_record.exp): New testcase.
+
 2004-03-31  Joel Brobecker  <brobecker@gnat.com>
 
        * Makefile.in (ALL_SUBDIRS) Add gdb.ada.
diff --git a/gdb/testsuite/gdb.ada/bar.adb b/gdb/testsuite/gdb.ada/bar.adb
new file mode 100644 (file)
index 0000000..a150b75
--- /dev/null
@@ -0,0 +1,8 @@
+package body Bar is
+
+   procedure Do_Nothing is
+   begin
+      null;
+   end Do_Nothing;
+
+end Bar;
diff --git a/gdb/testsuite/gdb.ada/bar.ads b/gdb/testsuite/gdb.ada/bar.ads
new file mode 100644 (file)
index 0000000..80d56f6
--- /dev/null
@@ -0,0 +1,8 @@
+
+package Bar is
+
+   type Empty is null record;
+
+   procedure Do_Nothing;
+
+end Bar;
diff --git a/gdb/testsuite/gdb.ada/null_record.adb b/gdb/testsuite/gdb.ada/null_record.adb
new file mode 100644 (file)
index 0000000..171ad77
--- /dev/null
@@ -0,0 +1,7 @@
+with Bar; use Bar;
+
+procedure Null_Record is
+begin
+   Do_Nothing;
+end Null_Record;
+
diff --git a/gdb/testsuite/gdb.ada/null_record.exp b/gdb/testsuite/gdb.ada/null_record.exp
new file mode 100644 (file)
index 0000000..f9afcf7
--- /dev/null
@@ -0,0 +1,26 @@
+if $tracelevel then {
+    strace $tracelevel
+}
+
+load_lib "ada.exp"
+
+set testfile "null_record"
+set srcfile ${testfile}.adb
+set binfile ${objdir}/${subdir}/${testfile}
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
+  return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+gdb_test "begin" \
+         "Breakpoint \[0-9\]+ at .*null_record.adb.*" \
+         "begin"
+
+gdb_test "ptype empty" \
+         "type = record null; end record" \
+         "ptype on null record"