4.11.2. Unknown information handler

The unknown information function is called if RVISS cannot handle an RDI_InfoProc request itself. It returns an RDIError value. This function can be used by a model extending the interface between RVISS and RealView Debugger.

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 Usage for some examples.

arg1/arg2

are arguments passed to the handler from RVISS.

Usage

RVISS 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.

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 logging level value.

RDIRequestCyclesDesc

This enables models to extend the list of counters provided by RealView Debugger @stats_symbolname symbols. Models call ARMul_AddCounterDesc() (see General purpose functions) to declare each counter in turn. It is essential that the model also trap the RDICycles info call.

RDICycles

Models that have declared a statistics counter by trapping RDIRequestCyclesDesc must also respond to RDICycles by calling ARMul_AddCounterValue() (see General purpose functions) for each counter in turn, in the same order as they were declared.

These info calls have already been dealt with by RVISS, and are passed for information only, or so that models can add information to the reply. Models must always respond to these messages with RDIError_UnimplementedMessage, so that the message is passed on even if the model has responded.

Install the handler using:

int ARMulif_InstallUnkRDIInfoHandler(RDI_ModuleDesc *mdesc,
                                     RDI_InfoProc *func, void *handle)

Remove the handler using:

int ARMulif_RemoveUnkRDIInfoHandler(RDI_ModuleDesc *mdesc,
                                    RDI_InfoProc *func, void *handle)

Example

The semihost.c model supplied with RVISS uses the UnkRDIInfoUpcall() to interact with RealView Debugger:

RDIErrorP

returns errors raised by the program running under RVISS to RealView Debugger.

RDISet_Cmdline

finds the command line set for the program by RealView Debugger.

RDIVector_Catch

intercepts the hardware vectors.

Copyright © 2002-2007 ARM Limited. All rights reserved.ARM DUI 0207D
Non-Confidential