From: Joel Brobecker Date: Thu, 1 Apr 2004 00:58:00 +0000 (+0000) Subject: * gdb.ada (bar.ads, bar.adb, null_record.adb): New files. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f0aaee494035335e128a3fe73bd3eaa91bec686d;p=binutils-gdb.git * gdb.ada (bar.ads, bar.adb, null_record.adb): New files. * gdb.ada (null_record.exp): New testcase. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index bec4bafe3ad..a5664a39062 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-03-31 Joel Brobecker + + * gdb.ada (bar.ads, bar.adb, null_record.adb): New files. + * gdb.ada (null_record.exp): New testcase. + 2004-03-31 Joel Brobecker * 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 index 00000000000..a150b752523 --- /dev/null +++ b/gdb/testsuite/gdb.ada/bar.adb @@ -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 index 00000000000..80d56f6240b --- /dev/null +++ b/gdb/testsuite/gdb.ada/bar.ads @@ -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 index 00000000000..171ad772445 --- /dev/null +++ b/gdb/testsuite/gdb.ada/null_record.adb @@ -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 index 00000000000..f9afcf7418d --- /dev/null +++ b/gdb/testsuite/gdb.ada/null_record.exp @@ -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"