![[Testing an instrumented file]](go_next.gif)
The Instrumentation Process
The first step is to instrument your program. Instrumentation adds calls to functions in R2PROTOS.C to your target program. For example, consider an if statement such as:
if ('a' == c)
If this statement were on line five of your source file, it would be changed to:
if (('a' == c)?R2True(R2srcfile_ptr,5):R2False(R2srcfile_ptr,5))
Where R2srcfile_ptr is a string holding the path of your source file.
Instrumentation is accomplished by running a RECON program called R2INST from the command line. The result of the instrumentation process is an instrumented copy of your source file.
Once your source code is instrumented, it must be compiled into an instrumented executable version of your system. This may involve linking with libraries and non-instrumented components. A RECON file called R2PROTOS.C must also be linked with your system and the header files R2.H and R2PROTOS.H must be present.
![]()
![]()
Site Map