⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rdi_info.h

📁 realview22.rar
💻 H
📖 第 1 页 / 共 5 页
字号:
/*
 * ARM RDI - RDIInfo codes: rdi_info.h
 * Copyright (C) 1994-1999 Advanced RISC Machines Ltd.
 * Copyright (C) 2000-2001 ARM Limited. All rights reserved.
 */

/*
 * RCS $Revision: 1.37.4.3.18.2 $
 * Checkin $Date: 2003/07/10 09:59:30 $
 * Revising $Author: dsinclai $
 */

#ifndef rdi_info_h
#define rdi_info_h


#if defined(__cplusplus) && !defined(CLX_CPP_LINKAGE)
extern "C" {
#endif

/* RDI_Info subcodes */
/* rdp in parameters are all preceded by                                */
/*   in byte = RDP_Info, word = info subcode                            */
/*     out parameters are all preceded by                               */
/*   out byte = RDP_Return                                              */

#define RDIInfo_Target          0
/* rdi: out ARMword *targetflags, out ARMword *processor id             */
/* rdp: in none, out word targetflags, word processorid, byte status    */
/* the following bits are defined in targetflags                        */
#  define RDITarget_LogSpeed                  0x0f
#  define RDITarget_HW                        0x10    /* else emulator  */
#  define RDITarget_AgentMaxLevel             0xe0
#  define RDITarget_AgentLevelShift       5
#  define RDITarget_DebuggerMinLevel         0x700
#  define RDITarget_DebuggerLevelShift    8
#  define RDITarget_CanReloadAgent           0x800
#  define RDITarget_CanInquireLoadSize      0x1000
#  define RDITarget_UnderstandsRDPInterrupt 0x2000
#  define RDITarget_CanProfile              0x4000
#  define RDITarget_Code16                  0x8000
#  define RDITarget_HasCommsChannel        0x10000

/*
 * RDI 1.51tx/rt defines the following:
 */

#  define RDITarget_CantCallbackInThread   0x00020000
#  define RDITarget_CanCallbackOutOfThread 0x00040000

#  define RDITarget_NonExecutableProcessor 0x00080000

#  define RDITarget_CantDebugStartStop     0x00100000
#  define RDITarget_CanDebugNonStop        0x00200000

/*
 * Asynchronous RDI defines the following:
 */
#  define RDITarget_CantExecuteSynchronously 0x00400000
#  define RDITarget_CanExecuteAsynchronously 0x00800000

/*
 * Refined hostos behaviour is indicated with
 */
#  define RDITarget_HostosSignalAware        0x01000000


#define RDIInfo_Points          1
/* rdi: out ARMword *pointcapabilities                                  */
/* rdp: in none, out word pointcapabilities, byte status                */
/* the following bits are defined in pointcapabilities                  */
#  define RDIPointCapability_Comparison   1
#  define RDIPointCapability_Range        2
/* 4 to 128 are RDIWatch_xx{Read,Write} left-shifted by two */
#  define RDIPointCapability_Mask         0x100
#  define RDIPointCapability_ThreadBreak  0x200
#  define RDIPointCapability_ThreadWatch  0x400
#  define RDIPointCapability_CondBreak    0x800
#  define RDIPointCapability_Status       0x1000 /* status enquiries available */

#define RDIInfo_Step            2
/* rdi: out ARMword *stepcapabilities                                   */
/* rdp: in none, out word stepcapabilities, byte status                 */
/* the following bits are defined in stepcapabilities                   */
#  define RDIStep_Multiple      1
#  define RDIStep_PCChange      2
#  define RDIStep_Single        4

#define RDIInfo_MMU             3
/* rdi: out ARMword *mmuidentity                                        */
/* rdp: in none, out word mmuidentity, byte status                      */

#define RDIInfo_DownLoad        4
/* Inquires whether configuration download and selection is available.  */
/* rdp: in none, out byte status                                        */
/* No argument, no return value. status == ok if available              */

#define RDIInfo_SemiHosting     5
/* Inquires whether RDISemiHosting_* RDI_Info calls are available.      */
/* rdp: in none, out byte status                                        */
/* No argument, no return value. status == ok if available              */

#define RDIInfo_CoPro           6
/* Inquires whether CoPro RDI_Info calls are available.                 */
/* rdp: in none, out byte status                                        */
/* No argument, no return value. status == ok if available              */

#define RDIInfo_Icebreaker      7
/* Inquires whether debuggee controlled by IceBreaker.                  */
/* rdp: in none, out byte status                                        */
/* No argument, no return value. status == ok if available              */

#define RDIMemory_Access        8
/* rdi: out RDI_MemAccessStats *p, in ARMword *handle                   */
/* rdp: in word handle                                                  */
/*      out word nreads, word nwrites, word sreads, word swrites,       */
/*          word ns, word s, byte status                                */

/* Get memory access information for memory block with specified handle */

#define RDIMemory_Map           9
/* rdi: in  RDI_MemDescr md[n], in ARMword *n                           */
/* rdp: in word n, n * {                                                */
/*           word handle, word start, word limit,                       */
/*           byte width, byte access                                    */
/*           word Nread_ns, word Nwrite_ns,                             */
/*           word Sread_ns, word Swrite_ns}                             */
/*      out byte status                                                 */
/* Sets memory characteristics.                                         */

#define RDISet_CPUSpeed         10
/* rdi: in  ARMword *speed                                              */
/* rdp: in word speed, out byte status                                  */
/* Sets CPU speed (in ns)                                               */

#define RDIRead_Clock           12
/* rdi: out ARMword *ns, out ARMword *s                                 */
/* rdp: in none, out word ns, word s, byte status                       */
/* Reads simulated time                                                 */

#define RDIInfo_ReadClock       0x8012
/*
 * Capability request for RDIRead_Clock
 * Returns: RDIError_NoError if read clock is allowed,
 *          RDIError_UnimplementedMessage otherwise
 */

#define RDIInfo_Memory_Stats    13
/* Inquires whether RDI_Info codes 8-10 are available                   */
/* rdp: in none, out byte status                                        */
/* No argument, no return value. status == ok if available              */

/* The next two are only to be used if RDIInfo_DownLoad returned no     */
/* error                                                                */
#define RDIConfig_Count         14
/* rdi: out ARMword *count                                              */
/* rdp: out byte status, word count (if status == OK)                   */

#ifdef host_h_LOADED /* unsigned32 is defined in host.h */
/* In addition, the next one is only to be used if RDIConfig_Count      */
/* returned no error                                                    */
typedef struct { unsigned32 version; char name[32]; } RDI_ConfigDesc;
#endif
#define RDIConfig_Nth           15
/* rdi: in ARMword *n, out RDI_ConfigDesc *                             */
/* rdp: in word n                                                       */
/*      out word version, byte namelen, bytes * bytelen name,           */
/*          byte status                                                 */

/* Set a front-end polling function to be used from within driver poll  */
/* loops                                                                */
typedef void RDI_PollProc(void *);
typedef struct { RDI_PollProc *p; void *arg; } RDI_PollDesc;
#define RDISet_PollProc         16
/* rdi: in RDI_PollDesc const *from, RDI_PollDesc *to                   */
/*      if from non-NULL, sets the polling function from it             */
/*      if to non-NULL, returns the previous polling function to it     */
/* No corresponding RDP operation                                       */

/* Called on debugger startup to see if the target is ready to execute  */
#define RDIInfo_CanTargetExecute 20
/* rdi: in  void
 *      out byte status (RDIError_NoError => Yes, Otherwise No)
 */

/* Called to set the top of target memory in an ICEman2 system
 * This is then used by ICEman to tell the C Library via the INFOHEAP
 * SWI where the stack should start.
 * Note that only ICEman2 supports this call.  Other systems eg.
 * Demon, Angel, will simply return an error, which means that setting
 * the top of memory in this fashion is not supported.
 */
#define RDIInfo_SetTopMem        21
/* rdi: in  word mem_top
 *      out byte status (RDIError_NoError => Done, Other => Not supported
 */

/* Called before performing a loadagent to determine the endianess of
 * the debug agent, so that images of the wrong bytesex can be
 * complained about
 */
#define RDIInfo_AgentEndianess   22
/* rdi: in void
 *      out byte status
 *      status should be RDIError_LittleEndian or RDIError_BigEndian
 *      any other value indicates the target does not support this
 *      request, so the debugger will have to make a best guess, which
 *      probably means only allow little endian loadagenting.
 */

#define RDIInfo_CanAckHeartbeat  23
/* rdi: in:  void
 *      out: word status
 *
 *      status returns RDIError_NoError to indicate heartbeats can be
 * acknowledged, non-zero otherwise. In addition, host can assume that if
 * target does support it, this call has enabled this support in both
 * host and target.
 */

#define RDIInfo_HeartbeatInterval 24
/* rdi: in:  word new
 *      out: word old
 *
 *      sets the maximum interval in microseconds which can elapse btw.
 * packets being sent on the comms channel. If 'new' is zero, value is 
 * not changed. Returns previous value.
 */

#define RDIInfo_PacketTimeout     25
/* rdi: in:  word new
 *      out: word old
 *
 *      sets the maximum interval in microseconds which can elapse btw.
 * a packet being sent, and a packet being received. If 'new' is zero,
 * value is not changed. Returns previous value. If this timeout is triggered
 * it is assumed that host-target comms has been broken.
 */

#define RDIInfo_AddTimeoutFunc    26
/* rdi: in:  ARMword *func
 *      out: word status
 *
 *      sets a function which will be called on a timeout error (as described
 * for PacketTimeout above) if detected by the lower levels. There can be
 * several such functions defined at once. Returns Error_NoError if ok.
 */

#define RDIInfo_RemTimeoutFunc    27
/* rdi: in:  ARMword *func
 *      out: word status
 *
 *      removes a function previosly added with AddTimeoutFunc above.
 * Returns Error_NoError if function removed ok.
 */

/*
 * Function:    RDI_InfoProc(mh, RDIInfo_Modules, arg1, arg2)
 *  Version:    RDI 1.5
 *  Purpose:    Called after RDI_open to obtain a list of Modules from the
 *              debuggee. The handle returned in the structure will be used
 *              in all subsequent calls requiring Module access.
 *
 *              Each module may be given a separate console.
 *              If arg1 == NULL use the target console.
 *
 *  Params:
 *      Input:  agent  handle identified agent
 *
 *              type   RDIInfo_Modules
 *
 *      In/Out:
 *              arg1   unsigned *nProcs
 *                     In: (*nProcs == 0): request to see how many processors
 *                                         are in the system.  The answer is
 *                                         returned in *nProcs
 *                         (*nProcs != 0): request for RDI_ModuleDesc array
 *                                         (arg2) to be filled in.  *nProcs is
 *                                         set to the size of the arg2 array
 *                                         on input, and on output is set to
 *                                         the actual number of processors.
 *
 *              arg2   RDI_ModuleDesc *array.  If (*nProcs != 0) this is an
 *                                         array of size *nProcs, and should
 *                                         be filled in for as many processors
 *                                         as are in the system.  
 *
 *  Returns:
 *      OK:     RDIError_NoError
 *      OK:     RDIError_NoMorePoints (no more modules)
 */
#define RDIInfo_Modules           28


/*
 *  Function: RDI_InfoProc(mh, RDIInfo_Modifiable, arg1, arg2)
 *   Version: RDI 1.5
 *   Purpose: Query whether Processor status can be modified
 *
 *    Params:
 *       Input: mh      handle identifies processor
 *
 *              type    RDIInfo_Modifiable
 *
 *   Returns:   RDIError_NoError        Status can be modified
 *              RDIError_ReadOnly       Status cannot be modified
 */
#define RDIInfo_Modifiable        29

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -