Function Capturing: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
Line 2: Line 2:


== Specification ==
== Specification ==
By using the STRIDE special [[scl_function]] pragma any global function could be captured. For example to capture the following function:
By using the STRIDE special [[scl_function]] pragma any global function could be captured. For example to capture:
<source lang="c">
<source lang="c">
/* foo.h */
/* foo.h */
Line 19: Line 19:
</source>
</source>


Once captured it could be instrumented by simply passing the new header file to the [[Build Tools|STRIDE Build Tools]].
By simply passing the new header file to the [[Build Tools|STRIDE Build Tools]] the captured function would become part of the [[Intercept Module]].
 


== Interception ==
== Interception ==

Revision as of 18:38, 15 March 2010

For a user function to be exposed to the STRIDE Test System it needs to be captured. Once made available it could be remoted or doubled.

Specification

By using the STRIDE special scl_function pragma any global function could be captured. For example to capture:

/* foo.h */
int foo(void);

create a new header file and add the following pragma statement:

/* foo_SCL.h */
#include "foo.h"

#ifdef _SCL
#pragma scl_function(foo)
#endif

By simply passing the new header file to the STRIDE Build Tools the captured function would become part of the Intercept Module.

Interception

Remoting