Datasheet
ARMulator Reference
ARM DUI0058D Copyright © 1999-2001 ARM Limited. All rights reserved. 4-35
4.7.2 Unknown RDI information handler
The unknown RDI information function is called if ARMulator cannot handle an
RDI_InfoProc
request itself. It returns an
RDIError
value. This function can be used by a
model extending the RDI interface between ARMulator and the debugger. For example,
the profiler module (in
profiler.c
) provides the
RDIProfile
info calls.
Syntax
typedef int RDI_InfoProc(void *handle, unsigned type,
ARMword *arg1, ARMword *arg2)
where:
handle
is the handle passed to
ARMulif_InstallUnkRDIInfoHandler
.
type
is the
RDI_InfoProc
subcode. These are defined in
rdi_info.h
. See below
for some examples.
arg1/arg2
are arguments passed to the handler from ARMulator.
Usage
ARMulator stops calling
RDI_InfoProc()
functions when one returns a value other than
RDIError_UnimplementedMessage
.
The following codes are examples of the
RDI_InfoProc
subcodes that can be specified as
type
:
RDIInfo_Target
This enables models to declare how to extend the functionality of the
target. For example,
profiler.c
intercepts this call to set the
RDITarget_CanProfile
flag.
RDIInfo_SetLog
This is passed around so that models can switch logging information on
and off. For example,
tracer.c
uses this call to switch tracing on and off
from bit 4 of the
rdi_log
value.
RDIRequestCyclesDesc
This enables models to extend the list of counters provided by the
debugger in
$statistics
. Models call
ARMul_AddCounterDesc()
(see
General purpose functions on page 4-41) to declare each counter in turn.
It is essential that the model also trap the
RDICycles
RDI info call.