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 - Runtime Options

Part II



Options used by Insure++ at application runtime

insure++.assert_ok filename::function
Specifies that the return value of the given function (the file qualifier is optional) should be treated as an opaque object and not checked for errors (see Opaque pointers). This is primarily useful for eliminating errors reported in third-party libraries.

insure++.checking_uninit [on|off]
If set to off, this option specifies that the code to perform flow-analysis and checking for uninitialized variables should not be executed, if present. See the insure++.checking_uninit for the compile time effects of this option. Runtime uninitialized variable checking is then limited to uninitialized pointer variables (See Uninitialized memory detection options).

insure++.checking_uninit_min_size [1|2|3|...]
Specifies the minimum size in bytes of data types on which Insure++ should perform full uninitialized memory checking. The default is 2, which means that chars will not be checked by default. Setting this option to 1 will check chars, but may result in false errors being reported. These can be eliminated by using the checking_uninit_pattern option to change the pattern used (see below).

insure++.checking_uninit_pattern pattern
Specifies the pattern to be used by the uninitialized memory checking algorithm. The default is deadbeef.pattern must be a valid, 8-digit hexadecimal value.

insure++.checking_uninit_stack_scribble [on|off]
Specifies extra uninitialized memory checking on the stack. This checking is not compatible with all compilers. If you get unusual core dumps after turning this option on, it is not compatible with your compiler and should be turned off.

insure++.demangle [off|on|types|full_types] C++
Specifies the level of function name demangling in reports generated by Insure++. If you have a function

	  void func(const int)
	  
you will get the following results:
Keyword
Results
off
func__FCi
on
func
types
func(int)
full_types
func(const int)

!insure++.demangle_method [external <filtname>|CC|gcc] C++
Specifies compiler-specific algorithm for demangling function names. Currently supported compiler algorithms are C-Front based C++ compilers (e.g. CC). If you are using a different compiler, Insure++ understands most other demangling formats as well. The filter <filtname> option allows the use of the external demangler filtname. The default is compiler-dependent. See the compiler level .psrc file, which is in the directory lib.$ARCH/$COMPILER.
This option is a compiled-in option, so you will need to prepend a ! to the option in a .psrc file to change the setting at runtime. See Compiled-in options for more details.

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 compile time options table. The string may also contain standard C formatting characters, such as '\n'. (For examples, see Customizing the output format.)

!insure++.exename [<short_name>] filename
Specifies the name of the executable, possibly with the path. This may be necessary to read the symbol table if Insure++ cannot find the executable. You will need to use the ! character with this option to override the compiled-in exename option built into the binary at compile-time. (see Compiled-in options) There are two ways to use this option. The simplest is to omit the short_name argument and just specify the executable name with the path of the executable. For example, if you have compiled a file called foo.c into an executable named foo in the /usr/local directory, the correct exename option would look like:
          !insure++.exename /usr/local/foo
          
Using the second option, you can specify the location of more than one executable. The short_name must be the name of executable when it was linked. The filename must be the full path and current name of the executable. For example, if you have built foo as above and also a program called bar (which was moved to your home directory and changed to foobar), you might use exename options like:
          !insure++.exename foo /usr/local/foo
          !insure++.exename bar ~/foobar
          
insure++.exit_hook [on|off]
Normally, Insure++ uses the appropriate atexit, onexit, or on_exit function call to perform special handling at exit. If for some reason, this is a problem on your system, you can disable this functionality via the exit_hook option.

insure++.exit_on_error [0|1|2|3|...]
Causes the user program to quit (with non-zero exit status) after reporting the given number of errors. The default is 0, which means that all errors will be reported and the program will terminate normally.

insure++.exit_on_error_banner [on|off]
Normally, when Insure++ causes your program to quit due to the exit_on_error option, it will print a brief message like the following:
          ** User selected maximum error count 
	  reached: 10. Program exiting. **
          
Setting this option to off will disable this message.

insure++.free_delay [0|1|2|3|...|119|...]
This option controls how long the Insure++ runtime holds onto "free'd" blocks before allowing them to be reused. This is not necessary for error detection, but can be useful in modifying the behavior of your program for stress-testing. The number represents how many free'd blocks are held back at a time - large numbers limit memory reuse, and 0 maximizes memory reuse. Please note that this option is only active if insure++.malloc_replace was on during linking.

insure++.free_pattern pattern
Specifies a pattern that will be written on top of memory whenever it is freed. This pattern will be repeated for each byte in the freed region (this option is available only if malloc_replace was on at compile time). The default is 0, which means no pattern will be written.

Bend
On some systems whose libraries assume freed memory is still valid, this may cause your program to crash.

insure++.free_trace [-1|0|1|2|3|...|10|...]
Specifies the maximum number of levels to track the stack whenever a block of dynamic memory is freed. Setting this option to a non-zero value tells Insure++ to include a description of the function call stack to at most the given depth whenever an error associated with the block is reported. Setting the value to 0 suppresses deallocation stack tracing, while the value -1 traces the stack back to the main routine.

insure++.ignore_wild [on|off]
Specifies whether Insure++ will do checking for wild pointers. Turning this option on turns off wild pointer checking.

insure++.leak_combine [none| trace|location]
Specifies how to combine leaks for the memory leak summary report. Combining by trace means all blocks allocated with identical stack traces will be combined into a single entry. Combining by location means all allocations from the same file and line (independent of the rest of the stack trace) will be combined. none means each allocation will be listed separately.

insure++.leak_ignore arguments
This option is for internal use only.

insure++.leak_search [on|off|full]
Specifies additional leak checking at runtime before a leak is reported. Requires that the symbol table reader be turned on. If "full" is selected, any pointer to anywhere in a block is sufficient to consider it not leaked. Selecting the "Full" option is useful when getting false leaks from 3rd party libraries.

insure++.leak_sort [none|frequency|location size]
Specifies by what criterion the memory leak summary report is sorted. Setting this to none may provide better performance at exit if you have many leaks.

insure++.leak_sweep [on|off]
Specifies additional leak checking at the termination of the program. Requires that the symbol table reader be turned on. If "full" is selected, any pointer to anywhere in a block is sufficient to consider it not leaked. Selecting "Full" is useful when getting false leaks from 3rd party libraries. Leaks detected will be reported using the summarize leaks option.

insure++.leak_trace [on|off]
This option determines whether or not full stack traces will be shown in the memory leak summary report.

insure++.malloc_pattern pattern
Specifies a pattern that will be written on top of memory whenever it is allocated. This pattern will be repeated for each byte in the allocated region (this option is available only if malloc_replace was selected at compile time). The default is 0, which means that no pattern will be written.

insure++.malloc_trace [-1|0|1|2|3|...|10|...]
Specifies the maximum number of levels to track the stack whenever a block of dynamic memory is allocated. Setting this option to a non-zero value tells Insure++ to include a description of the function call stack to at the most the given depth whenever an error associated with the block is reported. Setting the value to 0 suppresses allocation stack tracing, while the value -1 traces the stack back to the main routine.

insure++.new_overhead [0|2|4|6|8|...] C++
Specifies the number of bytes allocated as overhead each time new[] is called. The default is compiler-dependent, but is typically 0, 4, or 8.

insure++.pointer_slack [0|1|2]
This controls a heuristic in Insure++. When a pointer does not point to a valid block, but does point to an area 1 byte past the end of a valid block, does the pointer really point to that block? The value of this argument controls Insure++'s answer. The default should be changed only if Insure++ is not working correctly on your program.

Value
Meaning
0
Never assume the pointer points to the previous block.
1
Assume the pointer points to the previous block
if that block was dynamically allocated.
2
Always assume the pointer points to the previous
block. This tends to be incorrect for stack
and global variables, since they are usually
adjacent in memory.

insure++.realloc_stress [on|off]
If enabled, all calls to realloc will cause the block in question to move. This can be useful in triggering certain kinds of bugs where the possibility of realloc changing addresses was not considered.

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++.report_limit [-1|0|1|2|3|...]
Displays only the first given number of errors of each type at any particular source line. Setting this option to -1 will show all errors. Setting it to 0 will only show errors in summary reports, and not at runtime. (See Displaying repeated errors)

insure++.report_overwrite [on|off]
If set to off, error messages are appended to the report file rather than overwriting it on each run.

insure++.runtime [on|off]
If set to off, no runtime checking or profiling is performed. The program then runs much faster. This can be used to check to see if a particular fix has cured a problem, without recompiling the application without Insure++.

insure++.signal_catch [all|sig1 sig2 ... ]
Specifies a list of UNIX signals which Insure++ will trap. When these signals are detected, Insure++ displays a function call stack. Signals may be specified by number or by their symbolic names, with or without the SIG prefix. See Signals for more details.

insure++.signal_ignore [all|sig1 sig2 ... ]
Specifies a list of UNIX signals which Insure++ will ignore. Insure++ makes no attempt to trap these signals. Signals may be specified by number or by their symbolic names, with or without the SIG prefix. (See Signals)

You will want to use this if your program is expecting any of the signals that Insure++ catches by default.

insure++.source_path dir1 dir2 dir3
This option takes a list of directories in which to search for source files. (See Searching for source code) This will only be necessary if your source code has moved since it was compiled, as Insure++ remembers where all your source files are located.

insure++.stack_limit [-1|0|1|2|3|...]
Truncates runtime stack traces after displaying at most the given number of levels. Setting the option to -1 displays all levels. Setting the option to 0 disables stack tracing. (See Changing stack traces)

insure++.summarize [bugs] [coverage] [leaks] [outstanding]
Generates a summary report of errors (see The "bugs" summary), memory leaks (see The "leak" summaries), outstanding allocated memory blocks, or coverage analysis (see The "coverage" summary). In the latter case, the coverage_switches option (See the TCA manual) is consulted to decide how to present coverage data. The leaks and outstanding reports are affected by the leak_combine, leak_sort, and leak_trace options. With no arguments, this option will summarize the bugs and leaks summaries. This option has changed slightly in versions 3.1 and higher. The old leak defaults are equivalent to leak_combine location, leak_sort location, leak_trace off. The old detailed option is replaced by leak_trace on.

insure++.summarize_on_error [0|1|2|3|...]
Specifies how many errors must be generated before a summary (if requested) is printed. The default is 0, which means that summaries are always printed on demand. If the number is 1 or higher, summaries are only printed if at least the given number of bugs (or leaks) occurred. Suppressed errors do not count towards this number. If no argument is given with this option, a value of 1 is assumed.

insure++.suppress code [{context}]
Suppress error messages matching the given error code and occurring in the (optionally) specified context. (See Suppressing Error Messages, et seq.)

insure++.symbol_banner [on|off]
If set, Insure++ displays a message indicating that the program's symbol table is being processed whenever an application starts.

insure++.symbol_table [on|off]
If set to on, Insure++ will read the executable symbol table at startup. This enables Insure++ to generate full stack traces for third party libraries as well as for code compiled with Insure++. If this option is turned off, the stack traces will show only functions compiled with Insure++, but the application will use less dynamic memory and be faster on startup. To get filenames and line numbers in stack traces with this option off, you must compile your program with the stack_internal on option.

insure++.trace [on|off]
Turns program tracing on and off. In order to get file names and line numbers in the trace output, you must have the stack_internal on option set when compiling the program. See the Tracing section of this manual for more information about program tracing.

insure++.trace_banner [on|off]
Specifies whether to print message at runtime showing file to which the trace output will be written.

insure++.trace_file [filename|stderr]
Specifies filename to which trace data will be written. filename may use the same special tokens shown on Filenames.

insure++.uninit_globals [0|1|2]
After calling a function not compiled with Insure++, take the indicated action with respect to global variables.

Value
Meaning
0
  Do nothing.
1
  Initialize all variables which were uninitialized
  during the course of the function call.
2
  Initialize all global variables.

insure++.uninit_heap [0|1|2]
After calling a function not compiled with Insure++, take the indicated action with respect to dynamically allocated variables (i.e. variables on the heap).

Value
Meaning
0
  Do nothing
1
  Initialize all variables which were uninitialized
  during the course of the function call.
2
  Initialize all heap variables.

insure++.uninit_reference [on|off]
If this option is turned on, blocks which are passed by reference to functions not compiled with Insure++ are assumed to have been initialized by that function call.

insure++.uninit_stack_frame [-1|0|1|2|3|...]
After calling a function not compiled with Insure++, all variables local to the last given number of functions are assumed to be initialized. By default, this is 0, meaning that nothing is assumed. -1 indicates that all variables on the stack should be presumed initialized.

insure++.unsuppress code [{context}]
Enables error messages matching the given error codes and occurring in the (optionally) specified context. (See Enabling error messages, et seq.)

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