ABOUT gcov Gcov is a source code coverage analysis and statement-by-statement profiling tool. Gcov generates exact counts of the number of times each statement in a program is executed and annotates source code to add instrumentation. Gcov comes as a standard utility with the GNU Compiler Collection (GCC) suite.[1] The gcov utility gives information on …
Tag Archives: gcov
gcov code coverage
$vi hey.c $gcc -fprofile-arcs -ftest-coverage hey.c $./a.out Hey 🙂 $gcov hey.c File ‘hey.c’ Lines executed:100.00% of 3 hey.c:creating ‘hey.c.gcov’ $cat hey.c.gcov -: 0:Source:hey.c -: 0:Graph:hey.gcno -: 0:Data:hey.gcda -: 0:Runs:1 -: 0:Programs:1 -: 1:#include 1: 2:main() -: 3:{ 1: 4:printf(” Hey 🙂 \n”); 1: 5:} $ The “.gcov” files can be examined using a normal editor. …