Collecting coverage data

To collect coverage data:

  1. Compile and link your application under PureCoverage to instrument the program with coverage monitoring instructions:

         
    % purecov cc -g <myprog>.o

    or, if you compile and link at the same time:

         
    % purecov cc -g <myprog>.c

    The
    -g option supplies debug data that makes it possible for PureCoverage to collect coverage data at the line level; without it, PureCoverage can collect data only at the function level.
     

  2. Run the application to collect coverage data.

         
    % a.out

    The application displays its normal output on the console, just as if it were not instrumented. In addition, PureCoverage displays its start-up banner and recording message. For an example, click


    As you exercise the program, PureCoverage records data about function and line usage. When you exit the program, PureCoverage saves the coverage data in a
    PureCoverage data file (.pcv).

The next step in using PureCoverage is to view the coverage data.
 

What else can you do?