Triggering

To trigger on entry to a functionTo trigger on entry to a function

This sequence triggers on entry to a function only when it is called by one particular function.

1Select the state analyzer Trigger menu.

2Define the terms F1_START and F1_END to represent the start and end addresses of the calling function. Define F2_START to represent the start address of the called function.

3Under State Sequence Levels, enter the following sequence specification:

While storing “anystate” Find “F1_START” 1 time

While storing “anystate” TRIGGER on “F2_START” 1 time Else on “F1_END” go to level 1

Store “anystate”

This sequence specification assumes there is some conditional logic in function F1 that chooses whether or not to call function F2. Thus, if F1 ends without the analyzer having seen F2, the sequence restarts.

The specification also stores all execution inside function F1, whether or not F2 was called. If you are interested only in the execution of F1, without the code that led to its invocation, you can change the storage specification from “anystate” to “nostate” for the second sequence term.

1–8