Probe Point at End of Function

VectorCAST version 2019 SP2 now supports probe points at the end of functions, inserted right before each exit point. Specifically, if the function is void(), then the probe point is executed at the end of execution. If the function has one or more return() calls, then the probe point executes before the return() call and therefore before any function that might be called in the return() function. A function exit probe point is useful for calling VCAST_DUMP_COVERAGE_DATA() in a cover environment.

In the following example a function probe point is selected for the PlaceOrder function. The edit box for the function probe shows both entry and exit boxes.
 

 


 
  

Probe point files have changed as well.

Function entry probe points are now written in the following syntax in the probe point file, using PROBE_LOCATION: FUNCTION instead of PROBE_LOCATION:

--

BEGINNING_OF_FUNCTION:
 

PROBE_LOCATION: FUNCTION
PROBE_FUNCTION: my_function
PROBE_CODE:
vcast_probe_print("*** BEGINNING OF FUNCTION ***\n");
END_PROBE_CODE:

Function exit probe points are written with similar syntax:

PROBE_LOCATION: FUNCTION
PROBE_FUNCTION: my_function
PROBE_CODE_AFTER:
vcast_probe_print("*** END OF FUNCTION ***\n");
END_PROBE_CODE_AFTER:

 

The difference between the two is PROBE_CODE for entry point probes and PROBE_CODE_AFTER for exit point probes.

The probe point report has changed slightly. Accessed by selecting Probe Point Listing from the probe point icon on the toolbar, this report displays (function) instead of (beginning of function). In the report, text under Code Before is a function entry probe and Code After is in a function exit probe point.



Article ID: 1496
Last updated: 2019-11-04
Revision: 6
VectorCAST -> New Features from 2019 -> Probe Point at End of Function
https://kb.vector.com/entry/1496/