[RFA/testsuite/ada] Add null_record testcase
Joel Brobecker
brobecker@gnat.com
Mon Mar 29 20:11:00 GMT 2004
This is our first testcase involving an Ada program!
This testcase demonstrate a problem with our dwarf-2 reader, described
in http://sources.redhat.com/ml/gdb-patches/2004-02/msg00533.html.
This test currently fails, and then passes once the suggested patch
is applied.
2004-03-29 J. Brobecker <brobecker@gnat.com>
* gdb.ada (bar.ads, bar.adb, null_record.adb): New files.
* gdb.ada (null_record.exp): New testcase.
Tested on x86-linux (using an Ada-aware version of GDB based on GDB 6.0).
Ok to apply?
Thanks,
--
Joel
-------------- next part --------------
package Bar is
type Empty is null record;
procedure Do_Nothing;
end Bar;
-------------- next part --------------
package body Bar is
procedure Do_Nothing is
begin
null;
end Do_Nothing;
end Bar;
-------------- next part --------------
with Bar; use Bar;
procedure Null_Record is
begin
Do_Nothing;
end Null_Record;
-------------- next part --------------
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"
More information about the Gdb-patches
mailing list