Franz Kaufleitner wrote:
Hi all,
We're trying to use GCOV together with the ARM-ELF development
environment.
Our installation is:
arm-elf-gcc: 3.4.3
arm-elf-ld: 2.15
arm-elf-ar, binutils: 2.15
(1) First we've compiled with the following standard gcc command line
gcc -fprofile-arcs ?ftest-coverage ?o sample sample.c
Running the image will create the expected gcov data file sample.da.
(2) After them, we've tried it with the arm-elf-gcc
arm-elf-gcc -fprofile-arcs ?ftest-coverage ?o sample sample.c
Running the image in the arm emulation arm-elf-run, no gcov data
file sample.gda has been created.
(3) Next, we've tried to manipulate the gcov internals by putting a
debugging printf to the fuctions gcov_init and gcov_flush, but
it seems, that the code of these functions isn't entered.
It seems like ctor functions are not being run. Have you tried a C++ program
which requires dynamic initializtion of a global variable? Something like
struct Foo { Foo () {printf ("ctoring\n");}
~Foo () {printf ("dtoring\n");}};
Foo object;
int main () {}
what does that do?
If it doesn't print those two strings, then something's awry with process
startup. That is somewhat system dependent and it sounds like you're running on
a bare board. You'll need to examine your crt0 to see how it starts things up.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan@xxxxxxxxxxxxxxxx :: http://www.planetfall.pwp.blueyonder.co.uk