...
Table of Content Zone | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||
|
Anchor | ||||
---|---|---|---|---|
|
insure++.checking_placement_new [on|off]
Controls whether checks for placement new are used. See Troubleshooting for more information. Default is on
.
insure++.checking_uninit [on|off]
Specifies that the code to perform flow-analysis and check for uninitialized variables should not be inserted. Runtime uninitialized variable checking is then limited to uninitialized pointer variables. See checking_uninit [on|off] for the runtime effects of this option. Default is on
.
insure++.compiler_acronym abbreviation
Specifies the short-hand alternative name of a compiler, such as gcc
. This name is used to locate the appropriate .psrc files. It does not indicate which compiler will actually be called to compile source files (see the other compiler_*
options).
This option must be placed after the active compiler option, for example:
compiler c89 compiler_acronym cc
insure++.compiler compiler_name
Specifies the name of an alternative compiler. The default is platform-dependent. The indicated compiler will be called every time insure++ is called.
insure++.compiler_c C_compiler_name
Specifies the name of the default C compiler. The compiler will be called for any .c files.
The default is platform-dependent and is overridden by the compiler
and compiler_acronym
options.
insure++.compiler_cpp C++_compiler_name
Specifies the name of the default C++ compiler. The compiler will be called for any .cc, .cpp, and .cxx files. The default is platform-dependent.
This option is overridden by the compiler
and compiler_acronym
options.
insure++.compiler_default [c|cpp]
Specifies whether the default C or C++ compiler should be called to link when there are no source files on the link line. Default is c
.
This option is overridden by the compiler
and compiler_acronym
options.
insure++.compiler_deficient <argument(s)>
Specifies which features are not supported by your compiler. The default is compiler-dependent. You can specify the following arguments:
all
(includes all affirmative arguments)address
, no_addresscast
, no_castenum
,no_enum
member_pointer
,no_member_pointer
scope_resolution
,no_scope_resolution
static_temps
,no_static_temps
struct_offset
,no_struct_offset
types
,no_types
none
(compiler handles all cases)
Different compilers require different levels of this option. See the compiler-specific README files and in the <$PARASOFT>/lib.Win32/$compiler. or <$PARASOFT>>//$compiler (Unix) directory.
insure++.compiler_fault_recovery [off|on]
This option controls how Insure++ recovers from errors during compilation and linking. When set to on
and there is an error during linking, Insure++ will compile only and will not process the file. Insure++ will also attempt to take corrective action by using the -Zsl
option. If this option is turned off
, Insure++ will make only one attempt at each compile and link.
insure++.compiler_keyword [*|const|inline|signed|volatile] keyword
Specifies a new compiler keyword (by using the *
) or a different name for a standard keyword. For example, if your compiler uses __const
as a keyword, use the following option:
insure++.compiler_keyword const _const
insure++.coverage_boolean [on|off]
If set to on
, the only data that will be stored is whether or not each block was executed. If set to off
, the number of times each block was executed is also recorded. Setting this option to on
will cause your program to compile and run slightly faster.
insure++>coverage_map_data [on|off]
Prompts Insure++ to generate coverage map data for TCA.
insure++.coverage_map_file [filename]
Specifies the full path to the directory where Insure++ writes the tca.map file.
insure++.coverage_only [on|off]
Compiles and generates coverage information (tca.map). It also compiles and links source code for TCA.
insure++.error_format string
Specifies the format for error message banners generated by Insure++. The string may contain standard C formatting characters, such as \n
. For examples, see Customizing the Output Format.
The string arguments will be displayed as entered with the macro substitutions taking place:
%c
- Error category (and sub-category if required)%
d
- Date on which the error occurs (DD-MM-YYYY)%f
- Filename containing the error%F
- Full pathname of the file containing the error%h
- Name of the host on which the application is running%l
- Line number containing the error%p
- Process ID of the process incurring the error%t
- Time at which the error occurred (HH:MM:SS)
The error_format
option only takes effect if the Insure++ errors are being reported to the console or a file. If the errors are being sent to Insra, the error format in Insra will stay the same. For details on how to change where errors are sent, see Report File.
insure++.exit_on_error [0|1|2|3|...]
Causes Insure++ instrumentation to exit (with non-zero status) after reporting the given number of errors. The default is 0
, which means that all errors will be reported and instrumentation will terminate normally.
insure++.exit_on_error_banner [on|off]
When set to on
, the following message prints when Insure++ instrumentation exits due to the exit_on_error
option:
** User selected maximum error count reached: 1. Program exiting.**
insure++.file_ignore string
Specifies that any file which matches the string will not be processed by Insure++, but will be passed straight through to the compiler. The string should be a glob-style regular expression. This option allows you to avoid processing files that you know are correct. This can significantly speed up execution and shrink your code.
insure++.function_ignore function_name
This option tells Insure++ not to instrument the given function. This is equivalent to turning off the checking for that routine. If the function in question is a bottleneck, this may dramatically increase the runtime performance of the code processed with Insure++.
For example, assume that your application includes the following code:
Code Block | ||||
---|---|---|---|---|
| ||||
void foo(int) { } void foo(double) { } void foo(void*) { } struct Zork { void foo(void*) {} }; int main() { foo(1); foo(1.0); foo((void*) 0); Zork z; z.foo((void*) 0); return 0; } |
The function_ignore foo
option turns off instrumentation for the foo(int)
, foo(double)
, foo(void*)
, and Zork::foo(void*)
functions.
If you want to ignore a specific function, you must specify the function’s "mangled name," as determined by the IA64-ABI method (which the gcc-3.x compiler also uses). The IA64-ABI mangling specification is documented at http://www.codesourcery.com/cxx-abi/abi.html#mangling. The IA64-ABI mangling scheme is applied regardless of what platform you are working on. One way of getting the mangled name is to simply compile the file with the gcc 3.x compiler, and see what is produced in the .o file. Another way is to review the TCA output.
For instance, if you compile the previous sample code with gcc, the .o file shows the following mangled names:
Code Block |
---|
0000001a T _Z3fooPv 00000006 T _Z3food 00000000 T _Z3fooi 00000000 W _ZN4Zork3fooEPv U __gxx_personality_v0 00000020 T main |
Use the following option to ignore foo(int)
:
Insure++.function_ignore _Z3fooi
Use the following option to ignore foo(void*)
:
Insure++.function_ignore _Z3fooPv
Use the following option to ignore Zork::foo(void*)
:
Insure++.function_ignore _ZN4Zork3fooEPv
insure++.header_ignore string
Specifies that any function in the filename specified by the string will not be instrumented by Insure++. The string should be a glob-style regular expression and should include the full path.
This option allows you to avoid doing runtime checking in header files that you know are correct. This can significantly speed up execution and shrink your code. Please note, however, that the file must still be parsed by Insure++, so this option will not eliminate compile time warnings and errors, only runtime checking.
insure++.init_extension [c|cc|C|cpp|cxx|c++]
This option tells Insure++ to use the given extension and language for the Insure++ initialization code source file. The extension can be any one of the Insure++-supported extensions: c
for C code; or cc
, cpp
, cxx
, or c++
for C++ code. This option only needs to be used to override the default, which is the extension used by any source files on the insure++
command line. If there are no source files on the command line (for example, a separate link command), Insure++ will use a c extension by default.
insure++.interface_ignore function_name
Disables print inline interface. This option uses wildcards in the same manner as function_ignore
.
This option is intended for the use of Parasoft customer support and should only be utilized at the direction of a qualified Parasoft support agent.
insure++.linker linker_name
This option specifies the name of an alternative linker. This only applies if you are using the inslink
command.
insure++.linker_source source_code
This option tells Insure++ to add the given code to its initialization file. This can help eliminate unresolved symbols caused by linker bugs.
insure++.linker_stub symbol_name
Tells Insure++ to create and link in a dummy function for the given symbol_name
. This can help eliminate unresolved symbols caused by linker bugs.
insure++.logfile [filename|stderr|stdout|InsureLog.txt]
Specifies the filename to use when creating the Insure++ Log file. See Troubleshooting for more information.
insure++.logfile_banner [on|off]
Controls whether or not the terminal displays a message reminding you that log messages have been redirected to a file.
insure++.lrtCacheDir
Specifies the directory where Insure++ will store instrumented versions of system libraries. By default, this is set to the "LRT-cache" subdirectory of the Insure++ installation directory. You may wish to set this option if Insure++ is installed on a read-only file system, or on a file system with limited disk space. If you change this option, you should move or copy the existing LRT cache directory, together with its contents, to its new location.
insure++.multiByteChars [on|off]
If this option is set to on
, then Insure++ will recognize multibyte, (wide or double-byte chars), in some locations. Parsing multibyte chars is inefficient, so if you have only ASCII chars in your source code, then this option should be set to off
.
insure++.optionfile <file>
This option enables you to specify another file in which to direct Insure++ to read other .psrc file options. Examples:
optionfile $HOME/.psrc.$ARCH
- optionfile $HOME/myoptions.$MYPROJECT
This option is advantageous if you have multiple architectures or projects for which you want to use different settings. In the examples above, you can have multiple .psrc files in your $HOME directory that would be unique to a particular platform, project, etc., such as:
.psrc.linux2
.psrc.aix6
.psrc.solaris
myoptions.projectA
myoptions.projectB
Both examples can also be specified by means of an environment variable.
insure++.pragma_ignore string
Any pragma that matches string
will be deleted by Insure++. The string should be a glob-style regular expression.
insure++.rename_files [on|off]
Insure++ normally creates and passes an intermediate to the compiler. In some cases, this may confuse debuggers. If this is the case, you can set this option to on
and Insure++ will then rename the files during compilation so that they are the same. An original source file called foo.c
would be renamed foo.c.ins_orig
for the duration of the call to Insure++.
For example, the output to the screen would be:
***Renaming source file foo.c to foo.c.ins_orig***
or
***Restoring foo.c from foo.c.ins_orig***
insure++.report_banner [on|off]
Controls whether or not a message is displayed on your terminal, reminding you that error messages have been redirected to a file. See Report File for more information.
insure++.report_file [filename|insra|stderr]
Specifies the name of the report file. Environment variables and various pattern generation keys may appear in filename. For more information, see Filenames. Use of the special filename insra
tells Insure++ to send its output to Insra.
insure++.sizeof type value
This option allows you to specify data type sizes that differ from the host machine. This is often necessary for cross compilation. value
should be the number sizeof(type)
would return on the target machine. The following arguments for type
are allowed:
char
double
float
int
long
long double
long long
short
void *
insure++.sizet <unsigned int|unsigned long>
Specifies the data type returned by the sizeof
operator.
insure++.skipAsmFunctions [true|false]
Prompts Insure++ to ignore ASM functions during instrumentation. If the argument is empty, this option defaults to true
.
insure++.stack_internal [on|off]
If you are using the symbol_table off
runtime option, you can set this option to on
and recompile your program to get filenames and line numbers in stack traces without using the symbol table reader. See symbol_table [on|off] for more information.
insure++.stackpc [on|off]
Causes Insure++ to add the actual address of the instruction where an error has occurred to stack traces. The following partial error message is an example:
Code Block | ||
---|---|---|
| ||
Memory leaked leaving scope: p Lost block : 0x0804b710 thru 0x0804b719 (10 bytes) p, allocated at leakscop.c, 9 malloc() pc: 0x40041719 (interface) gimme() pc: 0x08049916 leakscop.c, 9 main() pc: 0x08049a59 leakscop.c, 15 Stack trace where the error occurred: gimme() pc: 0x080499b5 leakscop.c,10 main() pc: 0x08049a59 leakscop.c, 15 |
insure++.
stdlib_replace [on|off]
Links with an extra Insure++ library that checks common function calls without requiring recompilation. This is useful for finding bugs in third-party libraries or for quickly checking your program without fully recompiling with Insure++. This option does not apply in LRT mode.
insure++.string_table [on|off]
Moves the string table into a separate file.
insure++.suppress code
Suppresses compile time messages matching the indicated error code. Context-sensitive suppression does not apply at compile time.
insure++.suppressEDGWarning [on|off]
This options quiets down the parser. Many compile-time warnings and bug-reports are suppressed as well. It may be beneficial to parse your code once with this option set to off
, fix any problems found, and reset this option to on
to compile with less noise. With this option set to on
, warnings about DEAD_CODE, and UNUSED_VAR may be suppressed.
insure++.suppress_output string
Suppresses compile time messages including the indicated error string. See Suppressing Other Warning Messages for more information. For example, to suppress the following warning:
Code Block | ||
---|---|---|
| ||
{{[foo.c:5] Warning: bad conversion in assignment: char * = int * >> ptr = iptr;}} |
add the following string to this value:
bad conversion in assignment
insure++.temp_directory path
Specifies the directory where Insure++ will write its temporary files. Setting path
to a directory local to your machine can dramatically improve compile time performance if you are compiling on a remotely mounted file system.
insure++.uninit_flow [1|2|3|...|100|...|1000]
Insure++ can perform a lot of checks for uninitialized memory at compile time. This value specifies how hard Insure++ should try to analyze this at compile time. A high number will make Insure++ run slower at compile time, but will produce a faster executable. Values over 1000 are not significant except for very complicated functions.
insure++.uselockf [0|1|2|…]
Denotes the maximum number of retries Insure++ will attempt to obtain a lock on a file before giving up. This option is useful when building in parallel while using coverage. This option is automatically added when using -Zmp
.
insure++.unsuppress code
Enables compile time messages matching the indicated error code. Context sensitive suppression is not supported at compile time. See Enabling Error Messages for more information.
insure++.verbosity [0|1|2|3|4]
Tells Insure++ to create an Insure++ log in the current working directory with verbosity level set to a value between 1 and 4. 4 is the most verbose. See Troubleshooting for more information.
...