gcov / gcov-dump

Eddy Pronk epronk@muftor.com
Mon Jun 18 13:38:00 GMT 2007


I'm writing a tool which reads information (arcs) from the .gcno file 
produced by GCC with -ftest-coverage.

It calculates the NPATH complexity (number of execution paths in a function)

By doing this I found out the graph generated by GCC contains more paths 
then I expected. For every function call it generates "emergency exits" 
in case exceptions occur. (i'm guessing here)

I found some documentation in the gcov-io.h but I still have trouble 
figuring out how to interpret these paths. In some cases inline C++ code 
appears in the graph, but for simple cases it doesn't.

The .gcno files seemed a simple way to get access to the arcs, but I'm 
not sure the data is rich enough to work out the NPATH complexity. (for 
simple cases, it works well)

Any ideas how I can find more information to solve this?

Eddy

--
http://sourceforge.net/projects/gnocchi



More information about the Gcc mailing list