ggcov 0.8 review

by on

ggcov project is a GTK+ GUI for exploring test coverage data produced by C and C++ programs compiled with gcc -fprofile-arcs -ftest-c

License: GPL (GNU General Public License)
File size: 0K
Developer: Greg Banks
0 stars award from

ggcov project is a GTK+ GUI for exploring test coverage data produced by C and C++ programs compiled with gcc -fprofile-arcs -ftest-coverage. So it's basically a GUI replacement for the gcov program that comes with gcc.

Please note: ggcov is not a frontend for gcov; instead it reads the same data files directly and does various extra processing on them.

ggcov is released under the GNU General Public License (GPL) version 2 with no warranty.

Here are some key features of "ggcov":

Presents coverage information as graphically as possible, using bar graphs, colour coding, and a call graph display.


Information is linked together, e.g. double-clicking on a row in the File List window displays the source for that file in a Source window. Information in tabular form is sortable by any column, and all columns can be selectively shown or hidden.

Arbitrary Subsets

Coverage summaries for various subsets of the source (All the source, a particular source file, a particular function, a range of lines in a file) are only a few clicks away. The summary is presented in a window with both textual and graphical representation.

Multiple Directories

Source files spread over multiple directories are handled. The File List window can display source files either in a flat list or a tree. Lists of source files show filenames with minimum pathnames from the common ancestor directory.

Suppress by Pre-processor Symbol

The --suppress-ifdef flag can be used to suppress source lines inside #ifdef or #if blocks which depend on particular pre-processor symbols. For example --suppress-ifdef TEST,DEBUG will suppress source lines inside #if DEBUG or inside #ifdef TEST. Suppressed lines are not reported in summaries. This feature is useful to avoid having test infrastructure or debugging code spuriously reduce the reported coverage level.

Flexibility in Specifying Source

Source files can be specified by any combination of:

Directory: all coveraged source files in the directory and sub-directories.
Executable: all the coveraged source files used to build the object file and any shared libraries on which the executable depends.
Object file: all the coveraged source files used to build the object file.
Shared library: all the coveraged source files used to build the shared library.
Source file: exactly the specified source file.

C++ Function Names Demangled

C++ function names are presented in readable demangled form.

Non-local Control Transfer

Handles non-local control transfers, e.g. C++ exceptions or C longjmp.

GNOME Integration

A .desktop file is provided so that ggcov appears in the GNOME menu structure. New source files (or object files, or executables) can be dragged-n-dropped onto ggcov from Nautilus. In GNOME 2.x, configuration parameters are stored in the gconf database.

Text Mode

ggcov comes with a text mode program tggcov which can be used to provide coverage reports for individual source files or entire programs. tggcov is designed for non-interactive use, e.g. as part of a build process or test suite.

Call Graph Analysis

Calculates a call graph of all function calls known at compile time (i.e. excluding calls made through function pointers or C++ virtual function tables) and applies coverage data to this call graph. The result is that you can see how many times a function was called from various other functions. The downside of call graph analysis is that ggcov needs to read and pick apart object files to get the call data. The code exists and works for i386 platforms with ELF executables only.

PHP Web Interface

New in version 0.6 is a PHP edition of ggcov, which allows you to provide code coverage information on the web. The web edition has all the navigation and visualisation features of the GNOME program, but available in any graphical browser (no Java or Javascript required).

libglade library with GNOME support
GNOME libgnomeui library
GNOME gtk+ library
Optionally, the popt library
GNU libbfd from the binutils package

What's New in This Release:
Major improvements were made to the callgraph diagram, it should be far more useful.
Support for new versions of gcc on various platforms was added, and various bugs fixed.

ggcov 0.8 search tags