* gdb.ada (null_record.exp): New testcase.
+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.
--- /dev/null
+package body Bar is
+
+ procedure Do_Nothing is
+ begin
+ null;
+ end Do_Nothing;
+
+end Bar;
--- /dev/null
+
+package Bar is
+
+ type Empty is null record;
+
+ procedure Do_Nothing;
+
+end Bar;
--- /dev/null
+with Bar; use Bar;
+
+procedure Null_Record is
+begin
+ Do_Nothing;
+end Null_Record;
+
--- /dev/null
+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"