Oracle® Solaris Studio 12.4: Discover and Uncover User's Guide

Exit Print View

Updated: December 2015
 
 

Requirements for Using uncover

The uncover utility works on binaries compiled with at least Sun Studio 12 Update 1, Oracle Solaris Studio 12.2, Oracle Solaris Studio 12.3 compilers or Oracle Solaris Studio 12.4 . It works on a SPARC–based or x86–based system running at least the Solaris 10 10/08 operating system, or at least Oracle Solaris 11, Oracle Enterprise Linux 5.x, or Oracle Enterprise Linux 6.x.

A binary compiled as described includes information that uncover uses to reliably disassemble the binary to instrument it for coverage data collection.

To enable Uncover to use source code level coverage information use the –g option to generate debug information when compiling the binary. If your binary is not compiled with the –g option, Uncover uses only program counter (PC) based coverage information.

The uncover utility works with any binary built with Oracle Solaris Studio compilers, but it works best with binaries built with no optimization option. Previous releases of uncover required at least the –O1 optimization level. If you build your binary with an optimization option, uncover results will be better with lower optimization levels (–O1 or –O2). uncover derives source-line level coverage by relating the instructions to line numbers using the debug information generated when the binary is built with the –g option. At optimization levels –O3 and higher, the compiler might delete some code that might never be executed or is redundant, which might result in no binary instructions for some source code lines. In such cases, no coverage information is reported for those lines. See Limitations When Using uncover for more information.