Collecting code coverage data on your C or C++ program is a three-step process:
Instrumenting the binary with uncover.
Running the instrumented binary.
Running uncover again to generate a coverage report for use by Code Analyzer.
You can run the instrumented binary multiple times after instrumenting it, and accumulate data over all of the runs before generating the coverage report.
Before You Begin
To instrument your program with uncover to collect data for use by Code Analyzer, you must have compiled the program with Oracle Developer Studio version 12.3, 12.4, or 12.5 C or C++ compiler. Compiling with the –g option generates debug information that enables Code Analyzer to use source code level coverage information.
cp a.out.save a.out
% uncover binary-name
The code coverage data is written to a binary-name.uc directory.
% uncover -a binary-name.uc
The coverage report is written to the coverage subdirectory in the binary-name.analyze directory.