*.gcda files are not getting generated

Basavaraj A S (RBEI/EBA8) via gcc-help gcc-help@gcc.gnu.org
Tue Jun 25 07:18:00 GMT 2019


Dear Team,

I have a sample project to which I am trying to generate code coverage using GCov(gcov (MinGW.org GCC-6.3.0-1) 6.3.0).

I have CMAKE_CXX_FLAGS = -fprofile-arcs -ftest-coverage -fprofile-dir=tmp

Created an executable
add_executable(Executable xyz_test.cpp ../../../src/abc_actual.cpp ../Helper_file/file_helper.cpp) --> file path are proper. Compilation is through.

1.      I am getting *.gcno  files generated for xyz_test.cpp --> But not for abc_actual.cpp
2.      When I run this executable on the target(VirtualWare QNX image), I don't get gcda files for theabc_actula.cpp file. --> Hence no code coverage.


Can you please let me know , what step is missing here to get the gcda files for the actual source under test.?


Best regards,

A S Basavaraj
RBEI/EBA8

Tel. +91 80 61362201




More information about the Gcc-help mailing list