5.3.24. PreprocessorExeStart

[<<<] [>>>]

This entry point is used from the function scriba_Run implemented in the file `scriba.c' before the execution of the basic program starts.

The argument p points to the execution context of the basic program.

By this time most of the preprocessors should have asked the basic interpreter to unload. Only preprocessors implementing debugger, profiler or other development support functions may remain in memory and active.

At this very point debugger or other development support preprocessors may and should access the execution hook functions, like the sample debugger preprocessor does:

  case PreprocessorExeStart:

{ pExecuteObject pEo = p; pDebuggerObject pDO = pEXT->pPointer; pEo->pHookers->hook_pointer = pEXT; pDO->CallStackDepth = 0; pDO->DbgStack = NULL; pDO->StackTop = NULL; pEo->pHookers->HOOK_ExecBefore = MyExecBefore; pEo->pHookers->HOOK_ExecAfter = MyExecAfter; pEo->pHookers->HOOK_ExecCall = MyExecCall; pEo->pHookers->HOOK_ExecReturn = MyExecReturn; *pCmd = PreprocessorContinue; return 0; }

(Note that this is an example only and not the actual code. The actual code performs other tasks as well.)

The function has to return zero or the error code and should set the parameter *pCmd to PreprocessorContinue, PreprocessorDone, or PreprocessorUnload.

[<<<] [>>>]