This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
gcov vs. multiple objects derived from the same source
- From: "Bernd Jendrissek" <bernd dot jendrissek at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 5 Mar 2008 11:08:04 +0200
- Subject: gcov vs. multiple objects derived from the same source
[Please keep me Cc'ed as I am not subscribed.]
At work I have a bunch of source files that want to be compiled with
different CPPFLAGS. Since we now use automake, this implies that if
foo.c gets compiled into ${bindir}/bar, we get a file bar-foo.o, and
the same for the siblings of bar.
I'm worried that when I do gcov *.o, gcov might not notice that two
objects are derived from the same file, and thus the coverage notes
might reflect coverage only of a subset of the use cases - those that
exercise foo.c through ${bindir}/bar but not those that exercise it
through ${bindir}/baz.
Are there any guarantees (or specific lack thereof) about gcov's
behaviour under these circumstances?