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, for example.
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:
vcast_probe_print("*** BEGINNING OF FUNCTION ***\n");
Function Exit probe points are written with similar syntax:
vcast_probe_print("*** END OF FUNCTION ***\n");
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.