.\" .\" ggcov - A GTK frontend for exploring gcov coverage data .\" Copyright (c) 2003-2004 Greg Banks .\" .\" This program is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 2 of the License, or .\" (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software .\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA .\" .\" $Id: ggcov.1,v 1.7 2010-05-09 05:37:14 gnb Exp $ .\" .TH GGCOV "1" "May 2005" "GGCOV" "Greg Banks" .SH NAME ggcov \- a GNOME frontend for exploring gcov coverage data .SH SYNOPSIS \fBggcov\fP [\fIGNOME options\fP] [[\fB\-r\fP] \fIdirectory\fP|\fIfile\fP] ... .SH DESCRIPTION .PP \fBGgcov\fP is a GTK+ GUI for exploring test coverage data produced by C and C++ programs compiled with \fIgcc \-fprofile-arcs \-ftest-coverage\fP. So it's basically a GUI replacement for the \fBgcov\fP program that comes with \fBgcc\fP. .PP \fBGgcov\fP understands all the standard GTK+ and GNOME options, such as \fB\-display\fP and \fB\-disable\-crash\-dialog\fP. All other arguments are used to specify how to find coverage data files. The arguments can combinations of: .IP \fIdirectory\fP The directory is scanned for source files, which are handled as if they had been specified on the commandline (except that missing coverage data files are silently ignored). If the \fB\-r\fP flag is in effect, sub\-directories are scanned recursively. Multiple directories can be specified and are scanned in the order given. .IP \fIexecutable\fP The executable file is scanned for debugging records which contain source file names, and each source file which exists is handled as if it had been specified on the command line (except that missing coverage data files are silently ignored). Any shared libraries on which the executable depends are also scanned. Multiple executables can be specified and are scanned in the order given. This feature is only available on some platforms (for example, i386-linux). .IP \fIsource-file\fP Is any regular file ending in one of the file extensions \fI.c\fP, \fI.cc\fP, \fI.cxx\fP, \fI.cpp\fP, or \fI.C\fP. Source files are matched to their corresponding coverage data files (\fI.gcno\fP and \fI.gcda\fP files, or \fI.bb\fP, \fI.bbg\fP, and \fI.da\fP files with older compilers) and object files by searching for a file of the same basename and the appropriate extension first in the same directory as the source file and then in all the directories specified on the command line (in the order they were specified). .PP If no arguments are given, \fBggcov\fP shows a file selection dialog so you can select one directory, executable, or source file. .PP Directories, executables, or source files can also be added after \fBggcov\fP is started by dragging and dropping them from a GNOME Nautilus window onto any \fBggcov\fP window. .SH OPTIONS .TP \fB\-o\fP \fIdir\fP, \fB\-\-object\-directory\fP=\fIdir\fP Add the directory \fIdir\fP to the search path for object files and coverage data files. .TP \fB-p\fP \fIdir\fP, \fB\-\-gcda\-prefix\fP=\fIdir\fP Look for runtime coverage data files (\fI.gcda\fP files) underneath the directory \fIdir\fP instead of next to the corresponding \fI.c\fP files. See the example in the \fBggcov-run\fP(1) manpage. .TP \fB\-r\fP, \fB\-\-recursive\fP When a directory is specified on the command line, search for coverage data files recursively in all child directories. .TP \fB\-w\fP \fIwindows\fP, \fB\-\-initial\-windows\fP=\fIwindows\fP Open the named windows when \fBggcov\fP starts. Window names are \fIsummary\fP, \fIfiles\fP, \fIfunctions\fP, \fIcalls\fP, \fIcallbutterfly\fP, \fIcallgraph\fP, \fIlego\fP, \fIsource\fP, and \fIreports\fP. The default window is \fIsummary\fP. .TP \fB\-X\fP \fIsymbols\fP, \fB\-\-suppress\-ifdef=\fP\fIsymbols\fP Do not include in statistics or summaries, code inside C pre-processor directives which depend on any of the given \fIsymbols\fP. One or more symbols may be given, separated by commas or whitespace. \fBGgcov\fP understands the following subset of the C pre-processor command set: .IP \(bu \fI#if SYMBOL\fP .br \(bu \fI#if defined(SYMBOL)\fP .br \(bu \fI#ifdef SYMBOL\fP .br \(bu \fI#ifndef SYMBOL\fP .br \(bu \fI#else\fP .br \(bu \fI#endif\fP .br .IP For example, \fB-X DEBUG\fP will suppress the \fIfprintf()\fP call in this code: .IP .nf unsigned int my_function(unsigned int x) { x += 42; #ifdef DEBUG fprintf(stderr, "my_function: x=%u\\n", x); #endif return x; } .fi .IP This option is useful for suppressing test infrastructure code, debugging code, or other code which is compiled into the coverage test executable but whose coverage is not significant. .TP \fB\-Y\fP \fIwords\fP, \fB\-\-suppress\-comment=\fP\fIwords\fP Do not include in statistics or summaries, code on lines which also contains a single-line comment comprising only one of the given \fIwords\fP. One or more symbols may be given, separated by commas or whitespace. For example, specifying \fB-Y IGNOREME\fP will suppress the \fIassert()\fP in this code: .IP .nf unsigned int my_function(unsigned int x) { x += 42; assert(x >= 42); /* IGNOREME */ return x; } .fi .IP This option is useful for suppressing test infrastructure code, debugging code, or other code which is compiled into the coverage test executable but whose coverage is not significant. .TP \fB\-Z\fP \fIstartword,endword,...\fP .TP \fB\-\-suppress\-comment-between=\fP\fIstartword,endword,...\fP Do not include in statistics or summaries, code on lines between those containing a single-line comment comprising only \fIstartword\fP and the next single-line comment comprising only \fIendword\fP. Two or more symbols may be given, in pairs, separated by commas or whitespace. For example, \fB-Z STARTIGNORE,ENDIGNORE\fP will suppress the entire function in this code: .IP .nf /* STARTIGNORE */ unsigned int my_function(unsigned int x) { x += 42; return x; } // ENDIGNORE .fi .IP This option is useful for suppressing test infrastructure code, debugging code, or other code which is compiled into the coverage test executable but whose coverage is not significant. .SH EXAMPLES .PP View coverage data for all the available source in an executable (on some platforms only): .IP .B ggcov a.out .PP View coverage data for all the C source in the current directory, suppressing code which depends on the symbols \fBDEBUG\fP or \fBTEST\fP: .IP .B ggcov -X DEBUG,TEST *.c .PP View coverage data for all the C source in one directory where the object files and test coverage data files are in different directories: .IP .B ggcov /foo/obj/ /foo/cov\-data/ /foo/src/ .SH AUTHOR Written by Greg Banks .IR . .SH COPYRIGHT ggcov is Copyright \(co 2001\-2005 Greg Banks \fI\fP. .br This is free software; see the COPYING file for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH SEE ALSO .PP \fBggcov-run\fP(1).