This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Hey Ryan,
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.
This GCOV_PREFIX will - in newer versions at least - have no impact on the compile-time behavior. This environment variable is just used at run-time to instruct libgcov where to put the data files.

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 shortly looked through the GCC manuals and it seems that this feature was added with 4.1.2. But anyway, independent of this feature, you should get the data files at least at the embedded location.
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?
Here's what I would try:

* if possible in your project, try a newer version; the most recent version is 4.5.1
* debug the gcc runtime library; the parts responsible for data file creation are contained in libgcc (e.g. libgcc.a)
the source function doing the file creation is __bb_exit_func (libgcc2.c)


BTW, whenever the GCOV part in 3.3.6 cannot open the data file, it would print out an error message to stderr like

arc profiling: Can't open output file /devel/gcc/build-3.3.6/gcc/test/test.da.

Did you see this error message somewhere? Maybe in a re-directed logfile?


Andi




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]