Search

ParaSoft

HOME
PRODUCTS
SUPPORT
ABOUT
WHAT'S NEW
EVENTS


Insure++

Quick facts

Add-on Modules:
   -INUSE
   -TCA

Comparisons

Technical Papers

Support & Manuals

FAQs

Recent Reviews

User Testimonials

Press Releases


Insure tool to debug c++





Insure++ Reference - Compile-time Options

Part II



Options used by Insure++ during application compilation & linking:

insure++.auto_expand [all|off| on]
Specifies how Insure++should treat suspected "stretchy" arrays. See Stretchy Arrays for a discussion of stretchy arrays, and the table below for explanations of the allowed keywords for this option. Multi-dimensional arrays are never automatically expanded. To tell Insure++ that a specific array is stretchy, use the expand option.

Keyword
Meaning
all
All arrays at the end of structs, classes, and unions are treated as stretchy, regardless of size.
off
No automatic detection of stretchy arrays.
on
If the last field of a struct, class, or union is an array and has no size, size 0, or size 1, it is treated as stretchy. Note that only some compilers allow 0 or empty sizes, but size 1 is very common for stretchy arrays.

insure++.c_as_cpp [on|off] C++
Specifies whether files with the .c extension should be treated as C++ source code. With this option off, Insure++ will treat files with the .c extension as C code only. If you use C++ code in .c files, you should turn this option on.

insure++.checking_uninit [on|off]
Specifies that the code to perform flow-analysis and checking for uninitialized variables should not be inserted. Runtime uninitialized variable checking is then limited to uninitialized pointer variables. (See uninitialized memory detection options) See insure++.checking_uninit for the runtime effects of this option.

insure++.compile.reportfile [filename|insra|stderr]
Specifies the name of the report file for compile time messages only. Environment variables and various pattern generation keys may appear in filename. (See Filenames) Use of the special filename Insra tells Insure++ to send its output to Insra.

insure++.compiler compiler_name
Specifies the name of an alternative compiler, such as gcc. If your new compiler is not recognized by Insure++, you may have to set the compiler_acronym option. This option overrides all other compiler_* options: compiler_acronym, compiler_c, compiler_cpp, and compiler_default. The indicated compiler will be called every time insure++ is called.

insure++.compiler_acronym abbreviation
Specifies the colloquial name of an alternative compiler, such as gcc. This name is used to locate the appropriate .psrc files and TQS library modules. It does not indicate which compiler will actually be called to compile source files (see the other compiler_* options). This option overrides the compiler_c, compiler_cpp, and compiler_default options. In addition, this option must be placed after the active compiler option. The order must be
	  	compiler c89
          	compiler_acronym cc
          
and not vice versa.

insure++.compiler_c C_compiler_name
Specifies the name of the default C compiler, such as gcc. This compiler will be called for any .c files. The default is cc. This option is overridden by the compiler and compiler_acronym options.

insure++.compiler_cpp C++_compiler_name C++
Specifies the name of the default C++ compiler, such as g++. This compiler will be called for any .cc, .cpp, .cxx, and .C files. The default is platform dependent: cxx for Alpha, g++ for Linux, xlC for RS/6000, and CC for other platforms. This option is overridden by the compiler and compiler_acronym options.

insure++.compiler_default [c|cpp] C++
Specifies whether the default C or C++ compiler should be called to link when there are no source files on the link line. This option is overridden by the compiler and compiler_acronym options.

insure++.compiler_deficient C++
[all|address|cast|enum|member_pointer|
scope_resolution|static_temps|
struct_offset|types|no_address|no_cast|
no_enum|no_member_pointer|
no_scope_resolution|no_static_temps|
no_struct_offset|no_types|none]

Specifies which features are not supported by your compiler. The default is compiler-dependent.

Keyword
Meaning
    all    
  Includes all positive keywords.
address/no_address
cast/no_cast
enum/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 as indicated in the compiler-specific README files and in ($PARASOFT)/lib.($ARCH)/$compiler.

insure++.compiler_deficient
destructor_with_label
inline_parm_addr
implicit_templates

These options are for internal use by Insure++.

insure++.compiler_fault_recovery [off|on]
This option controls how Insure++ recovers from errors during compilation and linking. With fault recovery on, if there is an error during compilation, Insure++ will simply compile with the compiler only and will not process that file. If there is an error during linking, Insure++ will attempt to take corrective action by using the -Zsl options. If this option is turned off, Insure++ will make only one attempt at each compile and link.

insure++.compiler_fault_recovery_banner [off|on]
This option is for internal use only.

insure++.compiler_flags flags
This option is for internal use only.

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 option
          	compiler_keyword const __const
          
insure++.compiler_lib_flags flags
This option is for internal use only.

insure++.compiler_options keyword value
Specifies various capabilities of the compiler in use, as described in the following table.

Keyword
Value
Meaning
ansi
None
Assumes compiler supports ANSI C (default).
bfunc <type>
Function name
Specifies that the given function is a "built-in" that is treated specially by compiler. The optional type keyword specifies that the built-in has a return type other than int. Currently, only long, double, char * and void * types are supported.
btype
Type name
Specifies that the given type is a "built-in" that is treated specially by the compiler.
bvar <type>
Variable name
Specifies that the given variable is a "built-in" that is treated specially by the compiler. The optional type keyword specifies that the built-in has a return type other than int. Currently, only long, double, char *, and void * types are supported.
esc_x
Integer
Specifies how the compiler treats the '\x' escape sequence. Possible values are

    0    
treat '\x' as the single character 'x' (Kernighan & Ritchie style).
   -1    
treat as a hex constant. Consume as many hex digits as possible.
  >0    
treat as a hex constant. Consume at most the given number of hex digits.
for_scope
nested
notnested
optional
Specifies how for(int i; ...; ...)is scoped. Possible values are

  nested      
New ANSI standard, always treat as nested.
  notnested 
Old standard, never treat as nested.
  optional    
New standard by default, but old-style code is detected and treated properly (and silently).
knr
None
Assumes compiler uses Kernighan and Ritchie (old-style) C.
loose
None
Enables non-ANSI extensions (default).
namespaces
None
Specifies that namespace is a keyword (default).
nonamespaces
None
Specifies that namespace is not a keyword.
promote_long
None
Specifies that integral data types are promoted to long in expressions, rather than int.
sizet
d, ld, u, lu
Specifies the data type returned by the sizeof operator, as follows; d=int, ld=long, u=unsigned int, lu=unsigned long.
strict
None
Disables non-ANSI extensions (compiler dependent).
xfunctype
Function name
Indicates that the named function takes an argument which is a data type rather than a variable (e.g., alignof).
insure++.compiler_skipflags flags
This option is for internal use only.

insure++.disable_keyword [keyword]
If you are using a built-in keyword as an identifier, this option tells Insure++ not to use this ANSI keyword as a keyword.

Example: disable_keyword export
This allows the user to use "export" as a variable or function name instead of a keyword.

Note that this option only disables built-in keywords, not keywords added with the compilerkeyword .psrc option.

insure++.dynamic_linking [on|off]
By default, Insure++ links its libraries dynamically or statically according to the current link options. Setting this option to off tells Insure++ not to allow its libraries to be linked dynamically, even though user and/or system libraries may still be linked dynamically. This option is the opposite of static_linking.

insure++.error_format string
Specifies the format for error message banners generated by Insure++. The string argument will be displayed as entered with the macro substitutions taking place as shown in the following table. The string may also contain standard C formatting characters, such as '\n'. (For examples, see Customizing the output format)

Key
Expands to
%c
Error category (and sub-category if required)
%d
Date on which the error occurs (DD-MON-YY)
%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)

insure++.expand subtypename
Specifies that the named structure element is "stretchy". See Stretchy arrays for a discussion of stretchy arrays. See also the auto_expand option for details on automatic detection and handling of stretchy arrays.

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 file::function_name
This option tells Insure++ not to instrument the given function (the file qualifier is optional). This is equivalent to turning off the checking for that routine. If the function in question is a bottle-neck, this may dramatically increase the runtime performance of the code processed with Insure++. function_name can now (version 3.1 and higher) accept the * wildcard. For example, the option
		insure+.function_ignore foo*
	
turns off instrumentation for the functions foo, foobar, etc..

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 is for internal use only.

insure++.interface_defaults [all|*|alloc|new|delete|::alloc|::new|::delete|off|none] C++
Specifies for which functions to use standard interfaces. The standard interfaces assume that new and delete behave like the global new and delete in allocating a block of memory. If your functions adhere to those guidelines, you can specify use of the standard interfaces with this option.

Keyword
Meaning
all/*
Includes alloc and ::alloc
alloc
Includes new and delete
new
Assume all member news are "standard"
delete
Assume all member deletes are "standard"
::alloc
Includes ::new and ::delete
::new
Assume global new is "standard"
::delete
Assume global delete is "standard"
off/none
Assume nothing about new and delete

insure++.interface_disable key
This option tells Insure++ not to use the interfaces specified by the key. The interfaces will then not be inserted during instrumentation at compile-time. The key can be obtained by looking in the compiler default .psrc file (see Configuration files) for the interface_library option specifying the interfaces you wish to disable and removing the lib prefix and the .tqi file extension. For example, to turn off the C library interfaces, use the option
	  interface_disable c
	  
insure++.interface_enable key
This option tells Insure++ to use the interfaces specified by the key. The interfaces will then be inserted during instrumentation at compile-time. The key can be obtained by looking in the compiler default .psrc file (see Configuration files) for the interface_library option specifying the interfaces you wish to enable and removing the lib prefix and the .tqi file extension. For example, to turn on the C library interfaces, use the option
          interface_enable c
          
insure++.interface_ignore function_name
This option tells Insure++ not to use its interface for function_name.

insure++.interface_library file1, file2, file3, ...
Specifies Insure++ interface modules to be used on each compile. Equivalent to specifying the list on the insure command line. Filenames may include environment variables and Insure++ macros to help cross-platform development as described in Working on multiple platforms.

insure++.interface_preference [tql|tqi|tqs]
Specifies which interfaces are to be used in the case of conflicts. Interface conflicts (two interfaces for the same function but of different types) will be resolved in favor of the type occurring first in the interface preference list.

Types are:
tq1 - LRT interfaces
tqi - object interfaces (the Insure_XXX versions)
tqs - inline interfaces

Examples:

interface_preference tql tqi tqs (The default) Specifies preference in the following order: Use LRT first; if LRT is not available then object interfaces; if this is not available then use inline interfaces.

interface_preference tqi tqs (turns off LRT interfaces) Specifies preference in the following order: Prefer object interfaces to inline interfaces; do not use LRT interfaces.

insure++.interface_reset
Turns off all interfaces up to this point in the .psrc file. Additional interface_library options can be used after this line to add back certain interfaces.

insure++.interface_statics [on|off]
This option controls interface checking on static functions. If you want to have static functions with the same names as functions for which there are interfaces (e.g. write), you can turn off interface checking for these static functions by setting this option to off.

insure++.linker linker_name
Specifies the name of an alternative linker. This only applies if you are using the ins_ld command.

insure++.linker_dynlib_flag flag
This option is for internal use only.

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
This option 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++.malloc_replace [on|off]
If on, Insure++ links its own version of the dynamic memory allocation libraries. This gives Insure++ additional error detection abilities, but may have different properties than the native library (for example, it will probably use more memory per block allocated). Setting this option to off links in the standard library. This option does not apply in LRT mode.

insure++.object_ignore string
This option is for internal use only.

insure++.password arg1 arg2 arg3
Used for internal maintenance. This option should not be added or modified by hand. Licenses should be managed with pslic.

insure++.post_compile_command command_string
This option is for internal use only.

insure++.pragma_ignore string
Any pragma which matches the string will be deleted by Insure++. The string should be a glob-style regular expression.

insure++.pre_compile_command command_string
This option is for internal use only.

insure++.preprocessor command_string
This option is for internal use only.

insure++.preprocessor_flag flag
This option if for internal use only.

registertool Insure++ version
Used for internal maintenance. This option should not be modified.

insure++.rename_files [on|off]
Normally, Insure++ creates an intermediate file which is passed to the compiler. In some cases, this may confuse debuggers. If this is the case, you can set this option Insure++ will then rename the files during compilation so that they are the same. In this case, an original source file called foo.c would be renamed foo.c.ins_orig for the duration of the call to Insure++.

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 The Report File.

insure++.report_file [filename|insra|stderr]
Specifies the name of the report file. Environment variables and various pattern generation keys may appear in filename. (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 which differ from the host machine, which is often necessary for cross compilation. value should be the number sizeof(type) would return on the target machine. Allowed type arguments are char, double, float, int, long, long double, long long, short, and void *.

insure++.split_compile_link [on|off]
This option is for internal use only.

insure++.stack_internal [on|off]
If you are using the symbol_table off runtime option (see symbol_table), 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.

insure++.static_linking [on|off]
By default, Insure++ links its libraries dynamically or statically according to the current link options. Setting this option to on forces Insure++'s libraries to be linked statically, even though user and/or system libraries may still be linked dynamically. This option is the opposite of dynamic_linking.

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++.suppress code
Suppresses compile time messages matching the indicated error code. Context sensitive suppression does not apply at compile time (see Suppressing error messages, et seq).

insure++.suppress_output string
Suppresses compile time messages including the indicated error string (see Suppressing other warning messages). For example, to suppress the warning:
          	[foo.c:5] Warning: bad conversion in
	  	assignment: char * = int *
	  	>> ptr = iptr;
          
add the following line to your .psrc file.
          	suppress_output bad conversion in assignment
          
insure++.suppress_warning code
Suppresses C++-specific compile time messages matching the indicated warning code (see Suppressing C++ warning messages). code should match the numerical code Insure++ prints along with the warning message you would like to suppress. The codes correspond to the chapter, section, and paragraph(s) of the draft ANSI standard on which the warning is based. For example, to suppress the warning:
	  Warning:12.3.2-5: return type may not be
	  specified for conversion functions
	  
add the following line to your .psrc file.
	  suppress_warning 12.3.2-5
          
insure++.temp_directory path
Specifies the directory where Insure++ will write its temporary files, e.g. /tmp. The default is the current directory. 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++.threaded_runtime [on|off]
Specifies which Insure++ runtime library will be used at link time. This option should be turned on before linking threaded programs with Insure++.

insure++.uninit_flow [1|2|3|...|100|...|1000]
When Insure++ is checking for uninitialized memory, a lot of the checks can be deduced as either correct or incorrect 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++.unsuppress code
Enables compile time messages matching the indicated error code. Context sensitive suppression is not supported at compile time (see Enabling error messages, et seq).

insure++.virtual_checking [on|off] C++
Specifies whether VIRTUAL_BAD error messages will be generated. See Virtual Bad for more information about this error message.


< Configuration Options > Runtime Options
Tools to debug c++ and java
(888) 305-0041 info@parasoft.com Copyright © 1996-2001 ParaSoft