Gcov: Counting lines of source code (untested files) as gcov does

Nathan Sidwell nathan@codesourcery.com
Tue Jul 18 11:35:00 GMT 2006


Fredrik Johansson wrote:

> The untested files are compiled with --fprofile-arcs and
> -ftest-coverage so they do have .bb and .bbg files (again, I use Gcc
> 3.3.6) so my thinking is to extract the part of gcov.c that count
> source code lines and create my own tool to do this by reading the
> bb-file. But I've found that this is a bit "hairy" (is that an
> expression in english? ;)) as gcov.c depends on a bunch of other gcc
> files. And I suck at c to, by the way.

Yes, it was so hairy in fact that for 3.4 I ripped it up and reimplemented it 
all.  Starting where you are is going to be awkward whatever you do.

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::         CodeSourcery
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



More information about the Gcc mailing list