This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How gcov handles untested files, prior and after GCC 3.4


I posted a similiar thread a couple of weeks ago, but now I'm back
with some more on my feet and hopefully a more clear problem
description. Ok, so I have a sample application that just cout's a
line of text. If I compile it with GCC 3.3.6 and run the 3.3.6 gcov on
the source file I get this:
Could not open data file application.da.
Assuming that all execution counts are zero.
0.00% of 1 lines executed in file /usr/local/somedir/3.3.6/iostream
Creating iostream.gcov.
0.00% of 4 lines executed in file application.cpp
Creating application.cpp.gcov.

Then I complile the exact same application with GCC 3.4.4 and I get this when using gcov on it:
application.gcda:cannot open data file

The 3.3.6 version assumes that the file not has been run (which is the correct behaviour in my book) whereas the 3.4.4 version just "gives up". I know that a large remake was done to gcov and it's .bb,.bbg,.da contra .gcno, gcda files when 3.4 came along, but is that the reason to change this beviour or has this been change due to some other fact?

Why I ask is because I need to extract the number of lines even in
untested files, and I need it to work both on 3.3.6 and on various
3.4.x versions.


Fredrik Johansson

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]