Insure++ User's Guide - Selective Checking
Part I
By default, Insure++ will check for bugs for the entire duration
of your program. If you are only interested in a portion of your code,
you can make some simple, unobtrusive changes to the original source to
achieve this.
When you compile with insure , the pre-processor
symbol __INSURE__ is
automatically defined. This allows you to conditionally insert calls to
enable and disable runtime checks.
Suppose, for example, that you are not interested in events occurring
during the execution of a hypothetical function
grind_away . To disable checking during this function,
you can modify the code as shown below
grind_away() {
#ifdef __INSURE__
_Insure_set_option("runtime", "off");
#endif
... code ...
#ifdef __INSURE__
_Insure_set_option("runtime", "on");
#endif
}
Now when you compile and run your program, it will not check for bugs
between the calls to _Insure_set_option .
Alternatively, if you do not want to modify the code for the
grind_away function itself, you can add calls to
_Insure_set_option around the calls to
grind_away .
For more information, call (888) 305-0041 or send email to:
insure@parasoft.com
Insra
Interacting with Debuggers
Insure++ User's Guide TOC
|