Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA/testsuite/ada] Add null_record testcase
@ 2004-03-29 20:11 Joel Brobecker
  2004-03-31 16:13 ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Joel Brobecker @ 2004-03-29 20:11 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

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

[-- Attachment #2: bar.ads --]
[-- Type: text/plain, Size: 83 bytes --]


package Bar is

   type Empty is null record;

   procedure Do_Nothing;

end Bar;

[-- Attachment #3: bar.adb --]
[-- Type: text/plain, Size: 98 bytes --]

package body Bar is

   procedure Do_Nothing is
   begin
      null;
   end Do_Nothing;

end Bar;

[-- Attachment #4: null_record.adb --]
[-- Type: text/plain, Size: 84 bytes --]

with Bar; use Bar;

procedure Null_Record is
begin
   Do_Nothing;
end Null_Record;


[-- Attachment #5: null_record.exp --]
[-- Type: text/plain, Size: 537 bytes --]

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"

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-04-01  1:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-29 20:11 [RFA/testsuite/ada] Add null_record testcase Joel Brobecker
2004-03-31 16:13 ` Andrew Cagney
2004-04-01  0:58   ` Joel Brobecker
2004-04-01  1:04   ` Joel Brobecker
2004-04-01  1:35     ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox