comp.lang.ada
 help / color / mirror / Atom feed
From: francois@asterix.spar.ca (Francois Pomerleau)
Subject: Code coverage/profiling information for basic block under GNAT ?
Date: 1996/12/02
Date: 1996-12-02T00:00:00+00:00	[thread overview]
Message-ID: <FRANCOIS.96Dec2130934@asterix.spar.ca> (raw)



I am having difficulties to get a small test program that includes an Ada
task to run when generating profiling information for basic blocks. I
can compile but I get a segmentation fault when running it. 

Here is what I get from GDB

Program received signal SIGSEGV, Segmentation fault.
0x10f7c in system__tasking__stages__activate_tasks (chain_access=0xeffff254) at s-tassta.adb:321
s-tassta.adb:321: No such file or directory.


I was able to generate the profiling information (bb.out) for a
program with no Ada task.

I am using GNAT 3.04 under Sun OS 4.1.3 and compile my test programs using gnatmake:

gnatmake -g tasking.adb -cargs -a



Thanks in advance

Francois Pomerleau




Here is my test program with tasking

--------------------------------------------------------------
With Text_IO; use Text_io;

procedure tasking is

   procedure toto (data : integer) is
      buf : integer;
   begin
      if data > 3 then
         buf := data;
         buf := buf +1;
         buf := 10;
      else
         buf := 0;
      end if;
   end toto;
   procedure titi is
      buf : integer;
   begin
      for i in 1..10 loop
         buf := i;
      end loop;
   end titi;
   task tester is
       pragma Storage_Size(10000);
       entry go;
   end tester;
   task body tester is
   begin
      loop
         accept go;
         titi;
      end loop;
   end tester;
begin
   text_io.Put_line("Start");
   for i in 1..3 loop
      tester.go;
   end loop;
   for i in 1..2 loop
      toto (1);
   end loop;
 
   text_io.Put_Line("Done");

end tasking; 

-----------------------------------------------




                 reply	other threads:[~1996-12-02  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

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