Reputation:
I am trying to configure gcov with existing code base for code coverage.The existing code base is service based code base (.i.e contain multiple file c and cpp with one service)
I have gone following wiki page for configure gcov and added -fprofile-arcs -ftest-coverage into makefile. When I compile the service it generate only one gcno file which some name (BS-42e6.gcno).
As per wiki page,gcov should generate gcno file for each c and cpp file like test.c.gcno and test1.cpp.gcno but I got one gcno file.
I could not figure out how will I proceed further with gcno file.
This service is exist in xml based framework.So we pass input from xml and framework do the marshalling and unmarshanlling for input parameter and pass c or cpp file.
So I have query about the testing gcov file.As per the wiki pages we got a.out from compilation and we run a.out and generate respective file. But In my case How Will I proceed further.
Please let me know if I need to provide more info
http://gcc.gnu.org/onlinedocs/gcc/Gcov.html http://www.ecoscentric.com/ecospro/doc/html/ref/gcov.html http://codingfreak.blogspot.in/2009/02/gcov-analyzing-code-produced-with-gcc.html
Upvotes: 1
Views: 207
Reputation:
After a long debug,I found the issue When we pass gcov argument(-fprofile-arcs -ftest-coverage) during compile time.When I pass these argument during linking time I was able to generate successfully gcno file. just for reference for other
Upvotes: 1