* gdb.ada (bar.ads, bar.adb, null_record.adb): New files.

* gdb.ada (null_record.exp): New testcase.
This commit is contained in:
Joel Brobecker 2004-04-01 00:58:00 +00:00
parent ac81cb5421
commit f0aaee4940
5 changed files with 54 additions and 0 deletions

View 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.

View File

@ -0,0 +1,8 @@
package body Bar is
procedure Do_Nothing is
begin
null;
end Do_Nothing;
end Bar;

View File

@ -0,0 +1,8 @@
package Bar is
type Empty is null record;
procedure Do_Nothing;
end Bar;

View File

@ -0,0 +1,7 @@
with Bar; use Bar;
procedure Null_Record is
begin
Do_Nothing;
end Null_Record;

View File

@ -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"