This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcov questions
- From: Ed Swierk <eswierk at cs dot stanford dot edu>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 12 Aug 2003 18:07:15 -0700 (PDT)
- Subject: gcov questions
Hello,
A few questions:
(1) A while back, I hacked up gcov to generate coverage statistics for
multiple source files simultaneously. Unfortunately the version I hacked
up is fairly old (3.2.3), but I thought others might still find it useful.
Where would be an appropriate place to post such a patch?
(2) Eventually I would like to migrate to a more recent version of gcc.
I understand there were major changes in gcov in the 3.3 release, and a
perusal of the CVS archives reveals more recent changes to gcov. Is there
a summary of recent gcov development activity, or features that are
expected to be included in the 3.4 release?
(3) The codebase on which I am running gcov is mostly C++ code that makes
heavy use of member functions defined inline within class definitions.
Even when compiling in debug mode with no optimizations, I find that code
is not generated for such member functions if the compiler sees that they
are unused, and as a result those functions are not included in the
coverage statistics.
As a workaround, I compile with the -fno-default-inline flag. However,
this causes ld to fail unless I rebuild my entire codebase, including any
C++ libraries, with the same compiler flag. Unfortunately some of those
libraries themselves do not compile with that flag.
Before delving into gory details, am I headed down the right track with
-fno-default-inline, or is there another approach I am overlooking to get
more complete coverage statistics?
Assistance would be appreciated.
--Ed
--
Ed Swierk
eswierk@cs.stanford.edu