The options "-l -p" of gcov sometimes create names for .gcov files that exceed
the maximum file name length of 255 characters under Linux.
I managed to get this file name (261 characters):
#home#build#devel#wheel#linux#gcc41#ICOSOFT#PROJECTS#Libraries#D#DataRepository#Library#jam#linux#gcc41#profile#static#NetworkRetriever.gcda###home#build#devel#wheel#linux#gcc41#ICOSOFT#EXTLIBS#BOOST1#1.35.0#include#boost#detail#sp_counted_base_gcc_x86.hpp.gcov
gcov in this case returns with the error "could not open output file".
In my case I have a file name collision that forces me to use "-l -p". However
since "gcov -l -p" fails I am stuck.
I wonder why no UID or numbering scheme is used for .gcov files. The output of
gcov clearly tells which source file is linked to a given .gcov file.
Example (now):
File '/usr/include/c++/4.1/bits/locale_facets.tcc'
Lines executed:0.00% of 12
/usr/include/c++/4.1/bits/locale_facets.tcc:creating
'HelloWorld.gcda##locale_facets.tcc.gcov'
The last line could be changed to something like:
/usr/include/c++/4.1/bits/locale_facets.tcc:creating
'HelloWorld.gcda##000001.gcov'
or
/usr/include/c++/4.1/bits/locale_facets.tcc:creating
'HelloWorld.gcda##c5bbbc5921be4028b2a2cf44a2c04d90.gcov'
The source file can later also be deduced from the header within the .gcov
file:
-: 0:Source:/usr/include/c++/4.1/bits/locale_facets.tcc
So nothing would be lost by removing the source information from the .gcov file
name.
--
Summary: gcov -l -p exceeds maximum file name length
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: gcov-profile
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: peter dot klotz at aon dot at
GCC host triplet: x86_64-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36412