4.7.3. Event handler

This handler catches ARMulator events (see Events).

Syntax


typedef unsigned GenericCallbackFunc(void *handlevoid *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, Table 4.2, and Table 4.3.

((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 *funcvoid *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 *mdescvoid *node)

Example handler installation


ARMulif_InstallEventHandler(mdesc, CoreEventSel | ConfigEventSel, funchandle)

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI0058D
Non-Confidential