Questions tagged [gcov]

gcov is a code coverage tool for GCC

gcov allows you to analyze which parts of a program are not executed. This is interesting for example in order to know which part of a program are not tested. gcov also serves for profiling purposes.

gcov requires additional flags to be passed to GCC in order to generate a special version of a program. This version shouldn't be shipped because it is slower as it generates coverage data files.

575 questions
0
votes
2 answers

gcov can't open source file while using it in Android AOSP

I have following AOSP project setup 1) I have test.cpp in (AOSP root directory)/vendor/myProject/test.cpp 2) In Android.mk i have used LOCAL_CFLAGS += -g -fprofile-arcs -ftest-coverage LOCAL_LDFLAGS += -lgcov 3) When I compile the code i get…
Akshay
  • 1,137
  • 1
  • 10
  • 12
0
votes
2 answers

is Gcov an application based coverage or system based coverage

Is Gcov an application based coverage or system based coverage .gcda files doesn't get generated for all the files. the gcda files are created only for few source files. gcno files are created for all the source files complied with the gcov…
0
votes
3 answers

program crash after modification on gcc and gcov

Recently I'm trying to modify GCC and gcov to collect execution sequence for program. As we all know, gcc will instrument code on arcs between basic blocks to count the execution count of arc. So I instrument a function on the arc, and the function…
ShenYi
  • 121
  • 1
  • 7
0
votes
1 answer

Modify gcc gcov counter size

Due to very limited memory amounts, I would like to modify the size of the counters (currently 64 bits) used for coverage data with gcov (gcc -fprofile-arcs -ftest-coverage), and need some guidance in order to achieve this. Is it possible to alter…
MartinSuecia
  • 111
  • 2
  • 6
0
votes
1 answer

is it a bug of lcov or meaningful about the different hit count in one function?

10 [ + - ][ + - ] : 2 : Conf::~Conf() {} 11 : : 12 : : 13 : 2 : Conf::Conf( std::string filename, std::string delimiter, 14 : …
0
votes
1 answer

Coverage measurment action in gyp

I decided to use gyp as a build system for my project on linux. I am happy with basic functionality (target declarations, dependencies, hierarchies etc.) but I have some problems with customization. I have a Core project which is built as a library…
roman-kashitsyn
  • 539
  • 3
  • 14
0
votes
1 answer

Get LCOV compatible output from JSCover/JSCoverage coverage.xml or jscoverage.json

Summary I've recently switched from using Google's JsTestDriver to Testem but miss LCOV HTML Code Coverage Reports, is there a way to convert JSCover output into LCOV format, so I can use genhtml to create reports like these. Detail I'm working from…
Jamie Mason
  • 4,159
  • 2
  • 32
  • 42
0
votes
1 answer

eclipse CDT - Cannot open .gcda files

I am developing a coverage data tool in eclipse cdt. I used gcov and build and execute my C program to generate .gcda and .gcno files. When double click on .gcda file to see the coverage data, below error message displays. An error has occurred.…
Taani
  • 137
  • 11
0
votes
1 answer

libgcov.a missing in gcc 3.23

For some reasons I have to use an older version of gcc, gcc2.96 or gcc 3.23 Using the same, I need to perform a code coverage analysis on some code. However when I try to perform linking with -lgcov option, I get /usr/bin/ld: cannot find -lgcov I…
neorg
  • 516
  • 7
  • 21
0
votes
1 answer

lcov issue generating output file

I have been trying to get the code coverage of some test cases I have been running using lcov. However when I run lcov --directory $PWD --capture --output-file lcov.output I am getting a warning geninfo: WARNING: cannot find an entry for…
neorg
  • 516
  • 7
  • 21
0
votes
1 answer

Android/SQLite - Storage Location of Files

I am working on a test of an Android application that runs the SQLite methods in the Android API. I would like to get code coverage of the SQLite code in the Android Open Source Project (AOSP), and I have it set up to run G-Cov and save that…
NioShobu
  • 775
  • 2
  • 10
  • 21
-1
votes
1 answer

Collect GCOV results from binaries running on different hosts

Suppose I build my project with coverage on machine A. Copy executables of the project into machine B. Tests are run using these executables on machine B. Is there a way to collect coverage results for these runs?
-1
votes
1 answer

LCOV is generating coverage reports for only header files

I am using lcov and genhtml to generate code coverage reports. My unit test files only include the .h header files. client_test.cpp #include "gtest/gtest.h" #include "../client.h" ... lcov --capture --no-external --rc lcov_branch_coverage=1…
Dev Sen
  • 37
  • 2
-1
votes
1 answer

Code coverage (gcov) failing when C Functions used in a C++ app

I have a C++ app where I use some C functions. I have declared those C functions inside extern "C" {}; And it is compiling and working just fine. I am using 'gcc' for compiling the C code, and using 'g++' for linking that object with C++…
Dinesh G
  • 129
  • 7
-1
votes
1 answer

bash: extract executed line numbers from gcov report

gcov is a GNU toolchain utility that produces code coverage reports (see documentation) formated as follows: -: 0:Source:../../../edg/attribute.c -: 0:Graph:tmp.gcno -: 0:Data:tmp.gcda -: 0:Runs:1 -: 0:Programs:1 …
J. Doe
  • 77
  • 1
  • 8
1 2 3
38
39