I am fairly new to Embedded and VxWorks.
I tried to understand excHookAdd, but got stuck with implementation.
I do not ve clear conceptual understanding of this aspect based on VxWorks help:

Help suggests to use as:
void myHandler
int task, /* ID of offending task */
int vecNum, /* exception vector number */
*pEsf /* pointer to exception stack frame */

I am not clear as
1. Should we define myHandler in our application?
2. how the values for task, vecNum and pEsf will be populated?

I am using VxWorks 6.4 and ColdFire MC5475 EVB.

Could you please share me a sample excHookAdd implementation?

Thanks in advance for your inputs.