a �crit dans le message news: 8oip2j$ut0$1@nnrp1.deja.com... > I am working with Gnat 3.13a on Windows NT 4.0. > > I would like to use gcov to profile our application containing several > tasks. > The problem is that the da-files are written when the application exits, > but because most tasks contain infinit loops, the main program will not > exit. > I tried Win32.Winbase.ExitProcess but no da-files are written then. > > - so how to write intermediate profiling info to the da-files without > having to exit the application. > - or how to exit or terminate the application in such a way that the da- > files are written. > Note that aborting the tasks is not an option because not all tasks- > names are known or in scope. > Yes it is. There is a very simple way to abort all tasks in a system. In the main procedure (or some library package) have: Anonymous_Task : constant Task_ID := Current_Task; and then: Abort_Task (Anonymous_Task); (of course, you need to with Ada.Task_Identification). Since the main program is executed by the anonymous task, and since all tasks have (directly or indirectly) the anonymous task as one of their masters, this is guaranteed to kill everything. Have a look at package Debug from Adalog's component page (http://pro.wanadoo.fr/adalog/compo2.htm) for more details on that kind of techniques. -- --------------------------------------------------------- J-P. Rosen (Rosen.Adalog@wanadoo.fr) Visit Adalog's web site at http://pro.wanadoo.fr/adalog