Quick facts

Add-on Modules:


Technical Papers

Support & Manuals


Recent Reviews

User Testimonials

Press Releases

Insure tool to debug c++

Insure++ Reference - Configuration Files

Part II

Configuration Files

Insure++ programs read options from files called .psrc, which may exist at various locations in the file system. These options control the behavior of Insure++ and programs compiled with Insure++. The files are processed in the order specified below.

Earlier versions of Insure++ used configuration files called .insure. These files are still supported by this version, but will not be in the next. Any of the options on the following pages can also be used in the .insure files, but without the "insure++." prefix. However, we recommend that users move to the newer .psrc file as soon as they can.

  • The file .psrc in the appropriate lib and compiler subdirectories of the main Insure++ installation directory, e.g.


  • The file .psrc in the main installation directory.
  • A file .psrc in your $HOME directory, if it exists.
  • A file .psrc in the current working directory, if it exists.
  • Files specified with the -Zop switch and individual options specified with the -Zoi switch to the insure command in the order present on the command line.

In each case, options found in later files override those seen earlier. All files mentioned above will be processed and the options set before any source files are processed. You can also override these options at runtime by using the _Insure_set_option function.

Typically, compiler-dependent options are stored in the first location, site-dependent options are stored in the second location, user-dependent options are stored in the third location, and project-dependent options are stored in the fourth location. -Zop is commonly used for file-dependent options, and -Zoi is commonly used for temporary options.


Insure++ configuration files are simple ASCII files created and modified with a normal text editor.

Entries which begin with the character '#' are treated as comments and ignored, as are blank lines.

All keywords can be specified in either upper or lower case, and embedded underbar characters ('_') are ignored. Arguments can normally be entered in either case, except where this has specific meaning, such as in directory or file names.

If a line is too long, or would look better on multiple lines, you can use the '\' character as a continuation line.

Working on multiple platforms or with multiple compilers

Many projects involve porting applications to several different platforms or the use of more than one compiler. Insure++ deals with this by using two built-in variables, which denote the machine architecture on which you are running and the name of the compiler you are using. Anywhere that you would normally specify a pathname or filename, you can then use these values to switch between various options, each specific to a particular machine or compiler.

For example, environment variables, '~'s (for HOME directories) and the "%" notation described in Filenames are expanded when processing filenames, so the command

	interface_library $HOME/insure/%a/%c/foo.tqs

loads an interface file with a name such as


in which the environment variable Home has been replaced by its value and the '%a' and '%c' macros have been expanded to indicate the architecture and compiler name in use.

There is one additional comment that must be made here. In the compiler-default .psrc files, there are several interface_library options of the form

	$PARASOFT/lib.%a/%c/builtin.tqi \

Despite appearances, the PARASOFT used above is not a true environment variable. If the PARASOFT environment variable is not set by the user, it will be expanded automatically by Insure++ itself.

Option values

The following sections describe the interpretation of the various parameters. They are divided into two classes: compile time and runtime. Modifying one of the former options requires that files be recompiled before it can take effect. The latter class merely requires that the program be executed again.

Some options have default values, which are printed in the following section in boldface.


A number of the Insure++ options can specify filenames for various configuration and/or output files. You may either enter a simple filename or give a template which takes the form of a string of characters with tokens such as "%d", "%p", or "%V" embedded in it. Each of these is expanded to indicate a certain property of your program as indicated in the following tables. The first table lists the options that can be used at both compile and runtime.

Machine architecture on which you are running, e.g., sun4, rs6000, hp, etc.
Abbreviated name of the compiler you are using, e.g., cc, gcc, 5cc, etc.
Insure++ version number, e.g. 4.0
Insure++ version number without '.' characters, e.g., version 4.0 becomes 40.
.tqs file format version number, e.g., 4.0.0.
Similar to '%t' but with '.' characters removed.

This second table lists the tokens available only at runtime.

Time of program compilation in format: YYMMDDHHMMSS
Time of program execution in format: YYMMDDHHMMSS
Integer sufficient to make filename unique, starting at 0
Process I.D.
Name of executable
Directory containing executable

Thus, the name template

	insure++.report_file %v-errs.%D

when executed with a program called foo at 10:30 a.m. on the 21st of March 1993, might generate a report file with the name


(The last two digits are the seconds after 10:30 on which execution began.)

You can also include environment variables in these filenames so that


generates the same filename as the previous example, but also ensures that the output is placed in the reports sub-directory of the user's HOME.

Options at runtime and compile time

Several of the Insure++ options have effects during both compilation and program execution. When the option is active it is controlled by an extra qualifier keyword as shown in the examples below.

	insure++.runtime.suppress READ_NULL

suppresses errors in the READ_NULL class during program execution. An error in this class detected during compilation would still be reported.


	insure++.compile.unsuppress BAD_PARM(sign)

enables the display of this error category during compilation, but not during program execution. Compile time options also apply at link time.

If you wish to apply the same option to both compilation and execution, simply omit the qualifier.

	insure++.suppress EXPR_NULL

Using -Zop and -Zoi

On the command line, the -Zop and -Zoi options are processed from left to right, after all other .psrc files, and before processing any source code. Therefore, the following command line would tell Insure++ to compile all the files with the cc compiler.

	insure -Zoi "compiler gcc" -o foo foo.c
	      -Zop foo.def foo2.c -Zoi "compiler g++"
              foo3.c -Zoi "compiler cc"

	compiler CC

Compiled-in options

Insure++ now encodes certain options at compile-time into the actual binary that is built. Basically, Insure++ uses the information available at compile time, e.g. compiler name or executable name, and encodes a .psrc option into the binary itself. This option can be overridden in a .psrc file using the ! character. For example, if you build your executable with one name and run it in another directory or with a a different name, you could use an option like

	!exename /user/tmp/bar

to override the option inside the binary.

<- Insure++ Reference TOC > Compile-time Options
Tools to debug c++ and java
(888) 305-0041 Copyright © 1996-2001 ParaSoft