Execute hook support
The compiled execute hook can be a single event hook or a multiple event hook. A multiple event hook represents the simultaneous occurrence of more than one execute hook event. The multiple event hook collapses multiple EX instructions into a single EX instruction, followed by a NOP instruction.
Invoking the event handler:
- Single event hook:
If the debugger has been initialized when a single event hook is enabled and executed, the debugger event handler is invoked with the following interface:
- Event code 133
- A DSA that was in control when the hook was executed
- The offset of the hooks within the hook set that was executed (a multiple of 4 ranging from 0 to 15 inclusive)
- DSA format
- A buffer containing general purpose registers
- Return address to the routine that was interrupted
- Entry point to the routine that was interrupted
- Multiple event hook:
If the debugger has been initialized when a multiple event hook is enabled and executed and the hook for at least one of the events is active, the debugger event handler is invoked with the following interface:
- Event code 189
- A DSA that was in control when the hook was executed
- The offset of a multiple event hook is a specific number determined by the events
- DSA format.
- A buffer containing general purpose registers
- Return address to the routine that was interrupted
- Entry point to the routine that was interrupted
- Event mask
Use __setHookEvents() to enable or disable execution hooks.