📄 rdi100.h
字号:
* Input: address address of watchpoint
* Input: type one of RDIPoint_ types
*
* RDIPoint_EQ equal to address
* RDIPoint_GT greater than address
* RDIPoint_GE greater than or equal to address
* RDIPoint_LT less than address
* RDIPoint_LE less than or equal to address
* RDIPoint_IN in the range from address to bound, inclusive
* RDIPoint_OUT not in the range from address to bound, inclusive
* RDIPoint_MASK halt execution if (pc & bound) = address
*
* Input: datatype one of RDIWatch_ data types
* Input: bound upper address range
* InOut: none
* Output: *handle A handle to identify the watchpoint
*
* Returns:
* OK: RDIError_NoError
* OK: RDIError_NoMorePoints - successful,
* but no more points available
* Error: RDIError_CantSetPoint
*/
typedef int RDI100_SetWatchProc(
ARMword address, unsigned type, unsigned datatype, ARMword bound,
RDI_PointHandle *handle);
/*
* Function: RDI_ClearWatchProc
* Purpose: Clear a watchpoint in the debuggee.
*
* Params:
* Input: handle identifies watchpoint
* InOut: none
* Output: none
*
* Returns:
* OK: RDIError_NoError
* Error: RDIError_NoSuchPoint
*/
typedef int RDI100_ClearWatchProc(RDI_PointHandle handle);
/*
* Function: RDI_ExecuteProc
* Purpose: Starts execution of the debuggee from the current state.
* The debuggee continues until a natural exit occurs.
* The reason for exit is returned.
*
* Params:
*
* Output: *point if (return == RDIError_BreakpointReached)
* handle of breakpoint
* if (return == RDIError_WatchpointAccessed)
* handle of watchpoint
* else RDINoHandle
* In the current Demon debuggee the handles are not set.
* Here the debugger is required to fetch the pc to
* determine the point.
* (Demon condition is (pointReached && RDINoHandle))
*
* Returns:
* OK: RDIError_NoError
* OK: RDIError_BreakpointReached Breakpoint reached
* OK: RDIError_WatchpointAccessed Watch point accessed
* OK: RDIError_UserInterrupt User stop via RDISignal_Stop
*
* Vector Catches (see RDIVector_Catch Info call)
* OK: RDIError_BranchThrough0 Branch through zero
* OK: RDIError_UndefinedInstruction Undefined instruction
* OK: RDIError_SoftwareInterrupt Software interrupt
* OK: RDIError_PrefetchAbort Prefetch abort
* OK: RDIError_DataAbort Data abort
* OK: RDIError_AddressException Address exception
* OK: RDIError_IRQ Interrupt (IRQ)
* OK: RDIError_FIQ Fast Interrupt (FRQ)
* OK: RDIError_Error Error (see RDIErrorP)
*
*/
typedef int RDI100_ExecuteProc(RDI_PointHandle *handle);
/*
* Function: RDI_StepProc
* Purpose: Steps the debuggee from the current state.
* The debuggee continues until a natural exit occurs
* or the processor completes its next instruction.
*
* Params:
* Input: ninstr number of instructions to step
*
* Output: *point if (return == RDIError_BreakpointReached)
* handle of breakpoint
* if (return == RDIError_WatchpointAccessed)
* handle of watchpoint
* else RDINoHandle
* In the current Demon debuggee the handles are not set.
* Here the debugger is required to fetch the pc to
* determine the point.
* (Demon condition is (pointReached && RDINoHandle))
*
* Returns:
* OK: RDIError_NoError
* OK: RDIError_BreakpointReached Breakpoint reached
* OK: RDIError_WatchpointAccessed Watch point accessed
* OK: RDIError_UserInterrupt User stop via RDISignal_Stop
*
* Vector Catches (see RDIVector_Catch Info call)
* OK: RDIError_BranchThrough0 Branch through zero
* OK: RDIError_UndefinedInstruction Undefined instruction
* OK: RDIError_SoftwareInterrupt Software interrupt
* OK: RDIError_PrefetchAbort Prefetch abort
* OK: RDIError_DataAbort Data abort
* OK: RDIError_AddressException Address exception
* OK: RDIError_IRQ Interrupt (IRQ)
* OK: RDIError_FIQ Fast Interrupt (FRQ)
* OK: RDIError_Error Error (see RDIErrorP)
*
*/
typedef int RDI100_StepProc(unsigned ninstr, RDI_PointHandle *handle);
/*
* Function: RDI_InfoProc
* Purpose: Used to transfer miscellaneous information between the
* Debuger and the Debuggee. The parameters meanings change for
* each information type.
* Each type is defined in RDI_Info subcodes.
*
* Params:
* Input: type Information type code
*
* Use of arg parameters varies dependent on type code.
* See each individual definition below.
* InOut: arg1 parameter 1
* InOut: arg2 parameter 2
*
* Returns:
* OK: RDIError_NoError
* OK: codes dependent on type
* Error: codes dependent on type
* Error: RDIError_UnimplementedMessage (unimplemented functions)
*/
typedef int RDI100_InfoProc(unsigned type, ARMword *arg1, ARMword *arg2);
/*
* Function: RDI_PointinqProc
* Purpose: Breakpoint or watchpoint inquiry.
* Used to check before setbreak or setwatch is used.
* Returns what will happen if a corresponding call is made
* to setbreak or setwatch.
*
* Params:
* Input: type see setbreak or setwatch for definition
* Input: datatype 0 breakpoint
* != 0 see setwatch for definition
* InOut: *address
* In: address of point
* Out: set to actual value that will be used
* InOut: *bound
* In: upper address range
* Out: set to actual value that will be used
* Output: none
*
* Returns:
* OK: RDIError_NoError
* Error: RDIError_NoMorePoints (if cannot set)
*/
typedef int RDI100_PointInquiryProc(
ARMword *address, unsigned type, unsigned datatype, ARMword *bound);
/*
* Function: RDI_AddConfigProc
* Purpose: Declares the size of a config block about to be loaded.
* Only use if RDIInfo_DownLoad returns no error.
*
* Params:
* Input: nbytes size of configuration block to follow
*
* Returns:
* OK: RDIError_NoError
* Error: RDIError_UnimplementedMessage (unimplemented functions)
*/
typedef int RDI100_AddConfigProc(unsigned32 nbytes);
/*
* Function: RDI_LoadConfigDataProc
* Purpose: Loads the config block.
* The block specifies target-dependent information to the
* debuggee. (e.g. ICEman)
* Only use if RDIInfo_DownLoad returns no error.
*
* Params:
* Input: nBytes size of block (as declared in addconfig)
*
* data source of block
*
* Returns:
* OK: RDIError_NoError
* Error: RDIError_UnimplementedMessage (unimplemented functions)
*/
typedef int RDI100_LoadConfigDataProc(unsigned32 nbytes, char const *data);
/*
* Function: RDI_SelectConfigProc
* Purpose: Selects which of the loaded config blocks should be used
* and then reinitialises the Debuggee to use the selected
* config data.
* Only use if RDIInfo_DownLoad returns no error.
*
* Params:
* Input: aspect RDI_ConfigCPU or RDI_ConfigSystem
*
* name name of the configuration to be selected
*
* matchtype specifies exactly how the version number
* must be matched
* RDI_MatchAny
* RDI_MatchExactly
* RDI_MatchNoEarlier
*
* versionreq the version number requested
*
* Output: *versionp the version actually selected
*
* Returns:
* OK: RDIError_NoError
* Error: RDIError_UnimplementedMessage (unimplemented functions)
*/
typedef int RDI100_SelectConfigProc(
RDI_ConfigAspect aspect, char const *name,
RDI_ConfigMatchType matchtype, unsigned versionreq, unsigned *versionp);
/*
* Function: RDI_LoadAgentProc
* Purpose: Loads a replacement EmbeddedICE ROM image, and starts it
* (in RAM).
* Only if RDIInfo_Target returns a value with
* RDITarget_CanReloadAgent set.
*
* Params:
* Input: dest address in the Debuggee's memory where the new
* version will be put
* Input: size size of the new version
* Input: getb a function that can be called (with getbarg as
* the first argument) and the number of bytes to
* down load as the second argument.
* InOut: none
* Output: none
*
* Returns:
* OK: RDIError_NoError
* Error: RDIError_UnimplementedMessage (unimplemented functions)
*/
/* should be defined for RDI150 also */
typedef int RDI100_LoadAgentProc(
ARMword dest, unsigned32 size, RDI_GetBufferProc *getb,
RDI_GetBufferArg *getbarg);
/*
* Function: RDI_TargetIsDeadProc
* Purpose: Used to inform local device drivers that a remote
* (typically hardware) debuggee is unresponsive.
*
* Params:
*
* Returns:
* OK: RDIError_NoError
* Error: RDIError_UnimplementedMessage
*/
typedef int RDI100_TargetIsDeadProc(void);
/*
* Function: RDI_ErrMessProc
* Purpose: Gets an error message corresponding to the error number.
*
* Params:
* Input: buflen length of the buffer
* Input: errnum the error number
* InOut: none
* Output: buf destination for the message
*
* Returns: errmessproc returns the number of bytes written,
rather than an RDIError
*/
typedef int RDI100_ErrMessProc(char *buf, int buflen, int errnum);
/*
* Function: RDI_CpuNamesProc and RDI_DriverNamesProc
* Purpose: Get a list of names.
* The returned structure contains the number of names
* and a list of pointers to the sz names.
* The index to the chosen name is used in:
* Dbg_ConfigBlock.procesor (RDI 1)
* Dbg_ConfigBlock.drivertype
* RDI_ModuleDesc.procesor (RDI 2)
* This is used to select a harware driver for the target
* or a processor from a processor family.
* E.g. If the processor family was PROCESSOR_ARM
* the list would show the members of that family
* (ARM6, ARM7 etc.)
* Params:
*
* Returns:
* OK: RDI_NameList
* Error: none
*/
typedef RDI_NameList const *RDI100_NameListProc(void);
typedef struct RDI100_ProcVec
{
char rditypename[12];
RDI100_OpenProc *open;
RDI100_CloseProc *close;
RDI100_ReadProc *read;
RDI100_WriteProc *write;
RDI100_CPUReadProc *CPUread;
RDI100_CPUWriteProc *CPUwrite;
RDI100_CPReadProc *CPread;
RDI100_CPWriteProc *CPwrite;
RDI100_SetBreakProc *setbreak;
RDI100_ClearBreakProc *clearbreak;
RDI100_SetWatchProc *setwatch;
RDI100_ClearWatchProc *clearwatch;
RDI100_ExecuteProc *execute;
RDI100_StepProc *step;
RDI100_InfoProc *info;
/* RDI 1.02 */
RDI100_PointInquiryProc *pointinquiry;
/* These three useable only if RDIInfo_DownLoad returns no error */
RDI100_AddConfigProc *addconfig;
RDI100_LoadConfigDataProc *loadconfigdata;
RDI100_SelectConfigProc *selectconfig;
RDI100_NameListProc *drivernames;
RDI100_NameListProc *cpunames;
RDI100_ErrMessProc *errmess;
/* Only if RDIInfo_Target returns a value with RDITarget_LoadAgent set */
RDI100_LoadAgentProc *loadagent;
RDI100_TargetIsDeadProc *targetisdead;
} RDI100_ProcVec;
#endif /* rdi100_h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -