Sameeran Joshi
Sameeran Joshi

Reputation: 69

How to fix "geninfo: ERROR path/to/i386.gcno : could not open file" relating to coverage using gcov

I my trying to do code coverage of gcc source code for a set of 2000 programs. I built compiler with --enable-coverage compiler option so it generates the coverage files upon compilation of a sample program.

Running the following command :

path/to/bin/lcov -c -d  path/to/*.gcda/files/ -o info.info

I am getting error as:

Capturing coverage data from .
Found gcov version: 6.3.0
Scanning . for .gcda files ...
Found 460 data files in .
Processing i386.gcda
geninfo: ERROR: build/gcc/i386.gcno: could not open file

I am unable to find anything on google for such problem?

Upvotes: 0

Views: 2768

Answers (1)

VVish
VVish

Reputation: 311

Make sure your .gcda and .gcno files are in the same directory as gcov searches for .gcno files in the same location where .gcda files are.

Upvotes: 1

Related Questions