gcov

disable gcov in gcc build

Anyone know how, when making GCC, to tell it not to build gcov? It's giving me lots of errors for my target (powerpc-wrs-vxworks). ...

sed/awk: DOS to UNIX path substitution within a file

I have a file that contains this kind of paths: C:\bad\foo.c C:\good\foo.c C:\good\bar\foo.c C:\good\bar\[variable subdir count]\foo.c And I would like to get the following file: C:\bad\foo.c C:/good/foo.c C:/good/bar/foo.c C:/good/bar/[variable subdir count]/foo.c Note that the non matching path should not be modified. I know how...

Where is the gcov symbols?

I'm trying to compile a simple app with gcov and getting the following link errors: gcc AllTests.o CuTestTest.o CuTest.o -o TestTest AllTests.o: In function `global constructors keyed to 0_RunAllTests': /home/p7539c/cutest/AllTests.c:26: undefined reference to `__gcov_init' AllTests.o:(.data+0x44): undefined reference to `__gcov_merge_a...

Why does gcov report 0% coverage on a header file for a well used class?

I'm attempting to measure test coverage for the first time using gcov. Now that I'm past the initial learning curve, things seem to be going well, except for one little snag. I expect that it boils down to a lack of understanding on my part, so I'm hoping someone familiar with gcov can explain what's going on. The issue is that I hav...

Is there a way to focus lcov code coverage reports to just one or two directories?

I recently started using lcov to visualize my code coverage. It's a great tool. One thing I'm noticing is that it generates code coverage reports for all the files that I'm using - including those that I'm not interested in. For example, it will give me code coverage reports for boost and mysql++ files. Is there an easy way to force ...

Gcov reporting unexpected cover results

I made some changes to a library to keep it inline with a project. I ran the test and everything still passed but the coverage is no longer 100%. I investigated and saw that the code is executed just not reported. But I have no idea why gcov is not reporting coverage for the line when it is executing. This is the code: int32_t Previous...

Does gcov give code coverage analysis for assembly language code.

Hello, I have an application which i build using gcc on linux host for ARM target processor. This generated arm executable i execute on a ARM development board i have. I want to do some code coverage analysis: 1.)Will gcov show code coverage if i have ARM assembly source files in my build environment? 2.) If my build environment has s...

Why doesn't gcov report any lines being covered by my unit tests?

I am using Xcode 3.2 on 10.6, with the shipped version of gcov and default GCC compiler (both version 4.2.1). I have created a dependent Cocoa unit test bundle which is injected into my app, and followed Apple's documentation on setting up a gcov-instrumented build configuration - based on the Debug configuration which doesn't have any c...

Can gcc/gcov be made to output coverage stats to a location other than the source folder?

When using gcc with -fprofile-arcs and -ftest-coverage, when the resulting executable terminates, it tries to create .gcda output files in the same location as the .o files used to compile the executable. This is inconvenient when I'm running on a different machine than the one I built on -- is there any way to change this behaviour? ...

Setting up gcov in Xcode 3.1

I'm trying to setup my Xcode project to be instrumented with gcov so I can determine the code coverage of my unit tests. All of the documentation I find online talks about settings that I don't find in Xcode 3.1, though. An example: To work with Coverstory, first you need to set up your target to work with gcov. This requires turning...

More detail about, and non-trivial output from, gcov -f

All the GNU gcov manual online at http://gcc.gnu.org/onlinedocs/gcc/Invoking-Gcov.html#Invoking-Gcov says about gcov -f option is: -f --function-summaries Output summaries for each function in addition to the file level summary. Does anyone have more information, and maybe a non-trivial .gcov output file, from using this option...

gcov creates .gcov files in the current directory. Is there any way to change this?

I'm running gcov/gcc 4.1.2 on RHEL. When I want to specify a directory for the gcov files. Any ideas on how to do this? ...

Is there any actively supported lcov port for windows

Hi, I measure coverage for my code using gcov library and I would like to generate coverage report in user-friendly format. I've found lcov utility for that, but it's not compatibile with Windows environment (mainly because of the way the paths are parsed). Does anyone know about actively supported lcov port for Windows? It seems that ...

Error on syntax for generating coverage data from multiple files using lcov in Windows

Hi all: I would like some help... I'm having trouble coming up with the syntax to generate coverage data from multiple files using lcov in Windows. I have gcov, lcov and genhtml installed on cygwin (I'm running this under Windows). All of those files are inside cygwin/bin directory. The coverage data I flush through I believe are per...

How to set up gcov for code coverage analysis in iPhone SDK?

Hi, I've recently begun unit testing an app I write for the iPhone. I have the basics of creating my own tests down, even if it seems a little sub-optimal. I am, however, having real trouble setting up code coverage analysis using gcov. I followed the instructions here: http://www.cubiclemuses.com/cm/articles/2009/05/14/coverstory-on-t...

Anyone written a script that turns gcov branch coverage output into compiler warning format?

Most code editors know how to take a reasonably standard format of file_path, line_number, message_text and hyperlink into code. They know how because that's how they display compiler warnings. Visual Studio does it, and Source Insight is trivial to configure for that. If I have to I will write the script myself, but maybe someone has do...

lcov in cross-compile environment

Hello, I have some problems in using gcov/ lcov in a cross-compiler setting. What I have: I took the example main()-Program from the gcov documentation page and successfully compiled, linked and run it. I also was able to run lcov against it to produce the analysis in html pages. All this was in a native i.e. (NON cross-)compiling env...

Undefined symbols when attempting to use CoverStory with iPhone app: _vproc_transaction_end, _vproc_transaction_begin

After following these steps to set up an iphone project with CoverStory, my build fails with two linker errors. Undefined symbols: "_vproc_transaction_end", referenced from: _gcov_exit in libgcov.a(_gcov.o) _vproc_transaction_end$non_lazy_ptr in libgcov.a(_gcov.o) (maybe you meant: _vproc_transaction_end$non_lazy_ptr...

No test coverage files generated for Unit Test bundle in Xcode

The Problem I've got a Cocoa project on the desktop and I'm using Xcode 3.2.1 on Snow Leopard 10.6.2. I want to generate code coverage files for my Unit Test Target in Xcode. What I've Tried As articles like this one suggest, I've adjusted the build settings to: “Generate Test Coverage Files” checked “Instrument Program Flow” checke...

gcov warning: merge mismatch for summaries

Can anyone tell me what the gcov message "Merge mismatch for summaries" means? I have found the message in the gcc source here: http://www.opensource.apple.com/source/gcc/gcc-5646/gcc/libgcov.c It seems to be a sanity check that the tags in the .gcda files match, but I'm not sure. Anyone know how to work around this? ...