Datasheet
ARMulator Reference
ARM DUI0058D Copyright © 1999-2001 ARM Limited. All rights reserved. 4-37
4.7.3 Event handler
This handler catches ARMulator events (see Events on page 4-29).
Syntax
typedef unsigned GenericCallbackFunc(void *handle, void *data)
where:
handle
is the handle passed to
ARMulif_InstallEventHandler
.
data
must be cast to (
ARMul_Event *
), and contain:
((ARMul_Event *)data)->event
is one of the event numbers defined in Table 4-1 on page 4-29,
Table 4-2 on page 4-30, and Table 4-3 on page 4-30.
((ARMul_Event *)data)->addr1
is the first word of the event.
((ARMul_Event *)data)->addr2
is the second word of the event.
Usage
Install the handler using:
void *ARMulif_InstallEventHandler(RDI_ModuleDesc *mdesc, uint32 events,
GenericCallbackFunc *func, void *handle)
Specify one or more of the following for
events
:
•
CoreEventSel
•
MMUEventSel
•
PUEventSel
•
DebugEventSel
•
TraceEventSel
•
ConfigEventSel
.
Remove the handler using:
int ARMulif_RemoveEventHandler(RDI_ModuleDesc *mdesc, void *node)
Example handler installation
ARMulif_InstallEventHandler(mdesc, CoreEventSel | ConfigEventSel, func, handle)