| |||
| Home > RVISS Reference > Handlers > 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.
typedef int RDI_InfoProc(void *handle, unsignedtype, ARMword *arg1, ARMword *arg2)
where:
handleis the handle passed to ARMulif_InstallUnkRDIInfoHandler.
typeis the RDI_InfoProc subcode.
These are defined in rdi_info.h. See Usage for some examples.
arg1/arg2are arguments passed to the handler from RVISS.
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_TargetThis enables models to declare how to extend the functionality of the target.
RDIInfo_SetLogThis 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.
RDIRequestCyclesDescThis enables models to extend the list of counters
provided by RealView Debugger @stats_ symbols. Models
call symbolnameARMul_AddCounterDesc() (see General purpose functions) to declare each
counter in turn. It is essential that the model also trap the RDICycles info
call.
RDICyclesModels 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)
The semihost.c model supplied with RVISS
uses the UnkRDIInfoUpcall() to interact with
RealView Debugger:
RDIErrorPreturns errors raised by the program running under RVISS to RealView Debugger.
RDISet_Cmdlinefinds the command line set for the program by RealView Debugger.
RDIVector_Catchintercepts the hardware vectors.