Home

gcno

gcno files are part of GCC’s coverage instrumentation workflow used by gcov. They store the static structure of the program for a source file, including the control-flow graph (CFG) with basic blocks and edges and their mapping to source lines. Each source file compiled with coverage options typically yields one corresponding .gcno file. The format is binary and intended for tool consumption rather than manual viewing.

gcno and gcda together enable coverage analysis. The .gcno file is created at compile time, while a

Typical workflow: compile with -fprofile-arcs -ftest-coverage (or -coverage) for the source file, run the program to

Notes: .gcno files are architecture- and compiler-version dependent and are not meant to be edited. They reside

---

.gcda
file
is
produced
when
the
instrumented
program
runs;
the
.gcda
contains
runtime
execution
counts
for
the
CFG
edges
and
blocks.
After
running
the
instrumented
program,
tools
like
gcov
or
gcovr
read
both
files
to
generate
a
human-readable
coverage
report,
showing
which
lines
and
branches
were
executed.
generate
.gcda
data,
and
then
invoke
gcov
(or
an
equivalent
tool)
to
produce
a
report
such
as
a
.gcov
text
file
or
an
HTML/summary
view.
The
presence
and
consistency
of
the
.gcno
and
.gcda
files
are
essential
for
accurate
coverage
results;
recompilation
or
source
changes
can
require
regenerating
the
.gcno
files.
alongside
the
corresponding
source
and
object
files
in
the
build
directory.
In
practice,
coverage
analysis
unions
data
from
all
relevant
translation
units
to
produce
a
complete
picture
of
program
coverage.