RE: GCov and GCC, *.da Files Not Created

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andi,

Thanks for the response.  Using "strings," I verified that the *.da file
written in my executable:

strings <my_exectuable> | grep "suite1"
/<my_workspace>/cli/unit_tests/obj.debug-x86/src/suite1.da

I tried changing the location to which the data files are written by
setting the GCOV_PREFIX environment variable before building my
executable.  After rebuilding, I saw that the location to which the
suite1.da file would be written did not change.  I checked the GCC 3.3.6
manual, and saw that the section about "Data file relocation to support
cross-profiling" does not exist.  Was support for the GCOV_PREFIX and
GCOV_PREFIX_STRIP environment variables added sometime after 3.3.6?

I also ensured that I had write access to the "src" directory, but the
suite1.da file is still not getting created.  Do you have any other
suggestions that I might be able to try?

Thanks,
Ryan

-----Original Message-----
From: Andi Hellmund [mailto:mail@xxxxxxxxxxxxxxxx] 
Sent: Thursday, October 14, 2010 3:06 PM
To: Ryan Rueth (rrueth)
Cc: gcc-help@xxxxxxxxxxx
Subject: Re: GCov and GCC, *.da Files Not Created

Hey Ryan,

> I am using GCC version 3.3.6.  When I instrument my object files with
> -fprofile-arcs and -ftest-coverage, the appropriate *.bb and *.bbg
files
> are created.
>
> The object files are then linked together into a static library
libfoo.a
> with:
> ar rcs libfoo.a foo1.o foo2.o
>
> Finally, a series of static libraries are linked together to create my
> executable with:
> gcc -fprofile-arcs -o foo.o<static libraries get linked here,
including
> libfoo.a>
>
> Now, when I run the executable, the *.da files are not getting
created.
> Is there a step that I am missing?  Does anyone have any suggestions?
>    

This question has been asking quite often on this mailing list so that I

finally added a new section to our GCC wiki FAQ about a possible and 
most frequent root cause of your observation.

Please look at:
http://gcc.gnu.org/wiki/FAQ#gcc_gcov_data_file_not_created

If this is not working for you or you still have questions, don't 
hesitate to ask ...

Best regards,
Andi



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux