We just upgraded to gcc/gcov 4.0 and lcov stopped
working on our code. After some digging, it appears
that the geninfo script was choking on some 'function'
tokens in the .gcov file that were for Objective-C
code. Objective-C methods can look like:
And in certain instances, the colons in this function
name were fooling geninfo into thinking this matched
the <exec count>:<line number>:<source code> regex in
read_gcov_file(). Things went pear-shaped pretty
quickly after that.
The solution is to explicit check for the function
token, like is already being done for the branch and
call tokens in the .gcov file. For example, add the
following code after the 'elsif (/^call/)' line in
# Function execution
That fixed the problem for us anyway.