Gather code coverage data (GNU)
gcov_variant [options] sourcefile
QNX Neutrino, Linux, Microsoft Windows
The gcov_variant depends on the target platform, as follows:
For example, if x.h was included in a.c, then running gcov -l on a.c will produce a.c##x.h.gcov instead of x.h.gcov. This can be useful if x.h is included in multiple source files.
The gcov utility searches for the .bb, .bbg, and .da data files using this option. If a directory is specified, the data files are in that directory and named after the source file name without its extension. If a file is specified, the data files are named after that file without its extension. If this option isn't specified, it defaults to the current directory.
Without -p only the filename component is used. With -p, all directories are used, with / characters translated to # characters, . directory components removed and .. components renamed to ^. This is useful if source files are in several different directories.
The -p option also affects the -l option.
The gcov utility produces code coverage data for an application compiled with the -Wc,-fprofile-argcs -Wc,-ftest-coverage options to qcc (or the -fprofile-arcs -ftest-coverage options to gcc). This data is interpreted visually for you by the Code Coverage perspective in the QNX Momentics IDE.
For detailed documentation about gcov, see the gcc documentation on the GNU website at http://www.gnu.org/.