Code coverage engine for C/C++ on Windows.
A modern alternative to the abandoned OpenCppCoverage project.
Go to: Documentation
You don't need to compile or link your program with any specific options.
Having an .exe and a .pdb is enough.
cover++ run -s path\to\sources my-program.execover++ view report.coverppcover++ export json report.coverpp -o report.jsonFor a complete list of commands and options, see the documentation.
Cover++ integrates its various test suites with CTest, allowing them to be conveniently run with one unified command.
mkdir build # We want an out-of-source build
cd build
cmake .. # Configure with default options (includes testing)
cmake --build . # Build
ctest -C Debug # Run all test suitesCover++ uses CPack to generate installers.
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release
cpackTo develop the frontend or the documentation, you need Node and pnpm:
winget install OpenJS.NodeJS.LTS
winget install pnpm.pnpmYou can then run development servers in the frontend and docs directories:
pnpm devA process consists of one or more modules
(most commonly one .exe and a few .dlls).
Each module needs its own PDB.
A process owns one Virtual Address (VA) space. Each module owns a disjoint, contiguous region of this space.
A module is loaded at a base address. A module itself, and its PDB, contain Relative Virtual Addresses (RVA). These are relative to the base address: VA = base + RVA.
The DIA SDK provides methods using VAs as well as RVAs.
Before using any method that deals with VAs,
you need to inform the SDK of the base address of the module via IDiaSession::put_loadAddress.
We consistently use VAs throughout the codebase;
RVAs should not be used.