Mail Archives: djgpp/2004/07/31/16:00:38
Andrew Wall <wallguide-usenet AT yahoo DOT com> wrote:
> I'm trying to use gcov to show the coverage my unit tests manage on my
> software.
A good idea. Far too seldom is this exercise actually attempted.
> I can get make/gpp to compile and link and the executables run OK, but gcov
> doesn't always report the correct coverage.
There may be no way it can do that. The key to your problem is that
the calls to static constructors and destructors aren't done by any C
or C++ code compiled as part of your project. They're actually made
by low-level code in the runtime system (libgcc, *crt*.o), and
organized by some linker script magic (the ctor and dtor sections).
Which means there will be no, or at least no usable profiling
information present for their invocations.
This problem is almost certainly located in GCC itself, not in its
DJGPP port, so it should be reported to the GCC people.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -