Tuesday, September 19, 2006
6:54 AM

Linux Code Coverage profiling Tool

Compile cpp file with debug options
g++ -ggdb -fprofile-arcs -ftest-coverage -o hello Hello.cpp

Try Running it
./hello

Run Code Coverage tool
gcov Hello.cpp

View the lines that will be executed
vi Hello.cpp.gcov

0 comments:

Post a Comment