How PureCoverage finds source files

PureCoverage uses full pathnames to identify source files. This allows it to distinguish between like-named files in different directories.

PureCoverage ordinarily determines the location of source files when you instrument them. If you move source files to a different directory, however, PureCoverage cannot automatically identify them. In addition, some compilers do not record enough information in the object files for PureCoverage to determine where the source files are located.

For this reason, PureCoverage is designed so that it can determine the location of a source file when you view coverage data for the source file, as well as when you instrument the source file.

At instrumentation time

If the compiler encodes a full pathname into the object file, and if that pathname is valid, PureCoverage attributes counts to the specified file.

If the compiler provides only a file basename or if the full pathname is invalid, and if you specify the option -user-path, PureCoverage looks for the file in each of the directories specified in -user-path.

PureCoverage automatically appends both the current working directory and the directory where the object file resides to the end of the -user-path directory list. This helps PureCoverage find source files with missing or incorrect directory names.

At view time

If the filename determined at instrumentation time still exists, PureCoverage uses it to generate annotated source listings. If the filename no longer exists:

PureCoverage attempts to find the file's basename in each directory specified with the option -user-path. It automatically appends the current working directory to the -user-path directory list.

If PureCoverage still cannot find the file, it displays a dialog asking you for the location of the source file. If PureCoverage can open the file in the directory you specify, it appends the directory to the list in -user-path and uses it for subsequent searches.

PureCoverage outputs the filename determined during instrumentation in exported counts data. For details on exporting data, click