Re: lib(coverage) bug

From: Andrew John Sadler <ajs2_at_icparc.ic.ac.uk>
Date: Fri 21 Feb 2003 01:13:20 PM GMT
Message-Id: <E18mCzQ-000691-00@tempest.icparc.ic.ac.uk>
> If a module contains a directive that executes code within the module, for
> example to initialise some stae at compile time, lib coverage has not
> initialised enough state by the time it runs that directive.
>  
> example.
> 
> :- module(eg).
>  
> init :-
>  true,
>  true.
>  
> :- init.
> 
> [eclipse 3]: 2.
> ccompile("eg.ecl").
> array or global variable does not exist in incval_body(eg(0), coverage)
> Compiler: query exited (abort) in file
> /data5/stefano/RG/Code/AlgCode/Code/eg.ecl, line 7.
> coverage: inserted 3 coverage counters into module eg
> eg.ecl     compiled traceable 1440 bytes in 0.03 seconds
>  
> Yes (0.03s cpu)
> [eclipse 4]: 
> 
> 
> Stefano Novello
> Parc Technologies Limited
> Office: +44 (0)20 7261 4068
> Mobile: +44 (0)79 8985 4422<?xml:namespace prefix = o ns =
> "urn:schemas-microsoft-com:office:office" />

Yes, we know.  Plans are afoot to fix this (aswell as quite a few
other issues).  You can hack around the problem by declaring a
sufficiently large array with the appropriate name in the coverage
module before compiling.

You may also find the attached awk script usefull in combining the
results from multiple different line-coverage runs on the same file.

Andrew Sadler



Received on Fri Feb 21 13:13:28 2003

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:20 PM GMT GMT