Options for specifying files and directories

Option

Default

-auto-mount-prefix

/tmp_mnt

This option is used to specify the directory prefix used by the file system automounter, usually /tmp_mnt, to mount remote file systems in NFS environments. Use this option to strip the prefix, if present, to improve the readability of source filenames in PureCoverage reports.

If your automounter alters the prefix, instead of adding a prefix, use the syntax -auto-mount-prefix=/tmp_mnt/home:/homes to specify that the real file name is constructed from the apparent by replacing /tmp_mnt/home with /homes.

If you do not set this option correctly, PureCoverage may be unable to access files on automounted filesystems. The automounter may not recognize their names.
 

 

-user-path

none

This option specifies a list of directories to search for source code.

When searching for source code to build annotated source listings, PureCoverage looks for the file in the full pathname specified in the debugging data, then in directories listed in -user-path, and finally in the current directory.

PureCoverage can also use -user-path at instrumentation time to help resolve source-code path names if the debugging data is incomplete or the files have been moved. The resolved name is built into the executable and is used in the export data and at analysis time.

The directory where the object file resides and the current working directory are automatically appended to the end of the -user-path directory list to help find source files with missing or incorrect directory names.
 

 

-program-name

argv[0]

This option specifies the full pathname of the instrumented program. Use this option if argv[0] contains an undesirable or incorrect value--for example, when your program is invoked by an exec call whose path differs from the argument it passes as argv[0] to your program. In such cases, PureCoverage cannot find the program file, and therefore cannot match addresses to function names.
 

 

-log-file

stderr

Set -logfile=<filename> to save PureCoverage run-time messages to the named file.

When you specify a file name for output, -log-file overwrites any previous log file with the same name.

If this option is not set, PureCoverage run-time messages are sent to the program's stderr stream.

Sometimes it is more important that the PureCoverage instrumented application run exactly like the uninstrumented application, with no additional output to stderr, than it is to be reminded that coverage data is being collected. You can silence run-time messages by specifying the option -log-file=/dev/null.

If your application is instrumented for both PureCoverage and Purify, PureCoverage's start-up and data recording messages go to the Purify Viewer. If the option -log-file is set, the same log file receives both PureCoverage and Purify output. If you set PURIFYOPTIONS -log-file=plog and PURECOVOPTIONS -log-file=xlog, the value in PURIFYOPTIONS has precedence.

The -log-file options can be used with filename conversion characters.

To append output to an existing log file instead of replacing it, use the -append-logfile option.

 

 

-append-log-file

no

This option appends PureCoverage output to the current log file rather than replacing it.

 

 

-lib-path-length

not set

Specifies a fixed length for all library path names embedded inside your instrumented program or instrumented shared libraries. PureCoverage extends the path names to the specified length by prepending a series of slashes (/), which has no effect on the meaning.

For example,

% purecov -lib-path-length=50 cc -g myprog.c \
-L/path/dir -lmylib

causes the library to be registered in the resulting a.out file as something like:

///////path/dir/libmylib_pure_p0_c0_23260_58_32.sl

This option is intended to allow another team to work with your instrumented programs, even though they place the shared libraries in directories structured differently from yours. When the other team runs your instrumented program, they must use the option -replace-path to substitute the path that their environment requires. Use this option to make sure that the path length is sufficiently long to accommodate the longest absolute library path name that is likely to occur on the other team's system.

The value assigned must be less than or equal to 700. 300 is ordinarily a safe choice.

This option automatically calls the -force-rebuild option to rebuild all components of your program.

This option is supported only on HP-UX.
 

 

-replace-path

not set

In an instrumented shared library or an instrumented "incomplete" executable (that is, an executable that references a shared library), replaces one specified library path with another.

This option is intended to make it easier to run instrumented programs generated by other teams or on other systems. It allows you set library paths in instrumented files to reflect the location of the referenced libraries on your own system. When the other team creates the instrumented program, they should use the option -lib-path-length, selecting a value to accommodate the length of the longest absolute path on your system.

To use this option for an incomplete executable, type:

% purecov -replace-path <old-path> <new-path>  a.out

For an instrumented shared library, type:

% purecov -replace-path <old-path> <new-path> <shared_library>_pure_23456887.sl

Specify both paths as absolute paths.

If you need to replace more than one path name in a file, run this command as many times as necessary, replacing one path name on each pass.

This option is supported only on HP-UX.