GCOV: A GNU Coverage Testing Tool
GCOV: A GNU Coverage Testing Tool
GCOV: A GNU Coverage Testing Tool
2
What can gcov do? ARL
The University of Texas at Austin
3
What can gcov do for us? ARL
The University of Texas at Austin
4
Gcov Options ARL
The University of Texas at Austin
♦ -h, --help
– Display help about using gcov
♦ -a, --all-blocks
– Write individual execution counts for
every basic block. With this option
you can determine if blocks within a
single line are not being executed
♦ -b, -branch-probabilities
– Write branch frequencies to the
output file, and write branch summary
info to the standard output. This
option allows you to see how often
each branch in your program was taken 5
Gcov Options ARL
The University of Texas at Austin
♦ -c, --branch-counts
– Write branch frequencies as the
number of branches taken, rather than
the percentage of branches taken
♦ -n, --no-output
– Do not create the gcov output file
♦ Within a gcov file the format is
<execution_count>:<line_number>:<source
line text>
♦ - is for lines containing no code
♦ ##### is for lines which were never
executed
6
Gcov an Example ARL
The University of Texas at Austin
7
Gcov : An Example ARL
The University of Texas at Austin
8
Gcov : An Example ARL
The University of Texas at Austin
9
Gcov: An Example ARL
The University of Texas at Austin
10
Gcov: An Example ARL
The University of Texas at Austin
11
Gcov and CppUnit ARL
The University of Texas at Austin
12
Gcov and CppUnit ARL
The University of Texas at Austin
13
ARL
The University of Texas at Austin
14
WhereSat Old Version ARL
The University of Texas at Austin
15
WhereSat New Version Without -v ARL
The University of Texas at Austin
16
WhereSat New Version with -v ARL
The University of Texas at Austin
17