Testwell CTC++ · Comparison

Testwell CTC++ or gcov?

gcov is free, ships with GCC, and for many projects it is enough. It reaches its limits with other compilers, on constrained embedded targets, and when a safety standard requires you to justify the confidence placed in the tool. Here is how to choose.

gcov is enough if
  • all your code is compiled with GCC;
  • your tests run on a workstation, or on a target with a file system;
  • no standard requires you to qualify the tool.
Testwell CTC++ is the answer if
  • you compile with IAR, Keil or another cross compiler;
  • you measure on a constrained target, without a file system;
  • you must justify the confidence placed in the tool for a standard.
Comparison

The two tools, point by point

What each one does, according to the GCC documentation and Verifysoft's documentation.

CriteriongcovTestwell CTC++
NatureFree tool, shipped with GCC.Commercial tool from Verifysoft, distributed in France by Precilog.
CostFree.Paid license. Free evaluation on your code.
CompilersGCC only: “gcov works only on code compiled with GCC”. Clang has its own tool, llvm-cov.Native and cross compilers, C and C++: GCC, Visual Studio, IAR, Keil… The ctc command is placed in front of the compiler call, and the compiler keeps its options.
LanguagesC, C++ and the other GCC languages.C and C++; Java with an add-on.
InstrumentationBy the compiler, on the control flow graph. The GCC documentation advises compiling without optimization.In the source code, on a temporary copy, before compilation by your compiler.
MeasuresLines, functions, branches of the generated code. Since GCC 14: conditions and MC/DC (“masking” form).Functions, statements, decisions, conditions, MC/DC and multicondition.
ReportsAnnotated text files (.gcov). HTML reports with third-party tools: lcov, gcovr.Built-in HTML report, from the project down to the condition, on your source code.
Embedded targetWith a file system, as on a workstation. Without a file system: dump routine, linker script and transfer channel to write yourself.Run-time library supplied in C, adaptable to the target, even highly constrained and without a file system. Data sent back through the channel of your choice.
Safety standardsNo certificate: tool qualification is entirely up to the project.TÜV SÜD certificate for IEC 61508, ISO 26262, EN 50716, ISO 25119 and IEC 62304. DO-178C: project-specific qualification, with support from Verifysoft.
SupportCommunity.Verifysoft and Precilog.
MC/DC

gcov now measures MC/DC: what changes, and what remains

For a long time, gcov stopped at lines and branches. Since GCC 14, released in 2024, it can measure condition coverage and MC/DC: you compile with -fcondition-coverage, then run gcov --conditions. Clang has also offered MC/DC since version 18, with -fcoverage-mcdc.

This is real progress for projects compiled with GCC. Yet MC/DC alone does not settle the question for a project subject to a standard.

The compiler version

You need GCC 14 or later. A cross-compilation toolchain frozen on an earlier version, common in embedded development, does not benefit.

The form of MC/DC

GCC measures the so-called “masking” form of MC/DC. Clang limits MC/DC to six conditions per expression: beyond that, the expression is not measured.

Evidence for the standard

For ISO 26262 or IEC 61508, you must justify the confidence placed in the tool. Without a certificate, it is up to the project to qualify gcov, and to do it again at every version change.

Migration

Moving from gcov to Testwell CTC++

Your tests don't change. Only the way you compile changes, for the time of the measurement.

01

Keep your tests

Unit, integration or system tests: those that run today with gcov are used as they are.

Tests
02

Prefix the compilation

The ctc command is placed in front of the compiler call, in your build or your IDE. You keep your compiler and its options.

Build
03

Run, on a workstation or on the target

The instrumented program records coverage. On a target, the data is sent back through the channel of your choice.

Execution
04

Read the report

An HTML report, from the project down to the condition, with MC/DC and multicondition. It can go into your safety case.

Report

Nothing forces you to choose for the whole team: gcov can stay on developers' workstations, and Testwell CTC++ can be used for on-target measurements and for the evidence required by the standard.

Compare on your own code

A free evaluation of Testwell CTC++, with your compiler and your target: you see what gcov doesn't show you.

Request an evaluation →

Sources: gcov documentation ↗, gcov without an operating system ↗, Clang code coverage ↗, MC/DC in GCC ↗, Verifysoft comparison ↗.

Testwell CTC++  ·  Certification  ·  Integrations