Top "Gcov" questions

gcov is a code coverage tool for GCC

gcov not showing any coverage data

I am trying to use gcov on Linux(Ubuntu) to see frequency of execution for each line of source. I …

linux gcov
CMake Gcov c++ creating wrong .gcno files

I have a CMakeLists.txt file in which I added: set(CMAKE_CXX_FLAGS "-fprofile-arcs -ftest-coverage -pthread -std=c++11 -O0 ${…

c++ cmake gcov
What is the branch in the destructor reported by gcov?

When I use gcov to measure test coverage of C++ code it reports branches in destructors. struct Foo { virtual ~Foo() { } }; …

c++ gcc code-coverage gcov
How do I tell lcov where to find my .cpp & .h files?

My source and build tree looks like this (see Makefile to put object files from source files different directories into …

c++ code-coverage gcov lcov unittest++
CMake and lcov: gcno files not found

I am trying to get code coverage on my CMake based project (which consists of several targets). First I generate …

c++ cmake code-coverage gcov lcov
In SonarQube what is the difference in meaning between the "Lines to Cover" and "Uncovered Lines" metrics?

I am looking at the Coverage report within the Measures tab of a SonarQube analysed C++ project. On that page …

unit-testing sonarqube code-coverage gcov lcov
Looking for a way to exclude files used by geninfo/genhtml

We are trying to use geninfo and genhtml (alternative to gcovr, see here) to produce an html page using coverage …

html gcc gcov lcov
How to use gcov with Cmake

I'm having difficulties following this guide (that I've seen recommended on another post) on the matter https://github.com/bilke/…

c++ cmake gcov
Getting useful GCov results for header-only libraries

For my header-only C++ library (lots of templates etc) I use GCov to check test coverage. However, it reports 100% coverage …

c++ gcc gcov
lcov not working properly for coverage

I am trying to get html coverage for a test using gcc 4.8.2 and lcov 1.10. I am sure that my source, …

gcov lcov