📄 rdi150.h
字号:
*
* access type and width of access
*
* In/Out: *nbytes In: number of bytes to read
* Out: number of bytes actually read
*
* Output: *dest destination buffer
*
* Returns:
* OK: RDIError_NoError
* RDIError_BigEndian
* RDIError_LittleEndian
* Error: RDIError_DataAbort (if a memory exception occurs)
*/
typedef int RDI150_ReadProc(
RDI_ModuleHandle mh, ARMword source, void *dest, unsigned *nbytes,
RDI_AccessType type);
/*
* Function: RDI_WriteProc
* Purpose: Write memory contents in byte format to the debuggee.
* read *nbytes of data from source address in the caller's
* address space, and write to dest using the processor specified.
*
* Assuming nothing went wrong with the transfer, the debuggee
* will normally return RDIError_NoError. However, if the
* debuggee has changed its byte sex, it should return a
* notification of this change, i.e. either RDIError_BigEndian
* or RDI_ErrorLittleEndian; the caller must then acknowledge
* this notification by calling RDI_Info RDIInfo_AckByteSex.
* The debuggee will keep returning this notification until an
* acknowledgement has been received.
*
* Params:
* Input: mh handle identifies processor
*
* source source buffer
*
* dest destination address
*
* access type and width of access
*
* In/Out: *nbytes In: number of bytes to write
* Out: number of bytes actually written
*
* Returns:
* OK: RDIError_NoError
* RDIError_BigEndian
* RDIError_LittleEndian
* Error: RDIError_DataAbort (if a memory exception occurs)
*/
typedef int RDI150_WriteProc(
RDI_ModuleHandle mh, void const *source, ARMword dest, unsigned *nbytes,
RDI_AccessType type);
/*
* Function: RDI_CPUreadProc
* Purpose: Read the register content from the specified processor.
* The mask specifies which register(s) are to be transferred
* as 32-bit ARMwords.
* The mask has been extended to support more than 32 registers
* Params:
* Input: mh handle identifies processor
*
* Input: mode mode defines register context
* ARM
* RDIMode_Curr use the current mode
* Other values match the mode bits of the PSR.
* PICCOLO *** Use of Piccolo is obsolete ***
* RDIModeBankX Transfer registers
* from bankX
*
* Input: mask[] bits defining which registers are to be
* transferred. These bits can be ORed to read any
* combination of registers.
* ARM
* b0 - b14 r0 - r14
* b15 Reserved. Bit 15 must be clear;
* targets must ignore bit 15.
* RDIReg_PC PC
* RDIReg_CPSR CPSR register
* RDIReg_SPSR SPSR register
* PICCOLO *** Use of Piccolo is obsolete ***
* b0-b<x> mask of which words in the
* bank to transfer
*
* Output: state[] destination array of ARMwords
*
* Returns:
* OK: RDIError_NoError
* Error: error code
*/
typedef int RDI150_CPUReadProc(
RDI_ModuleHandle mh, unsigned mode, unsigned32 mask, ARMword *state);
/*
* Function: RDI_CPUwriteProc
* Purpose: Write the register content to the specified processor.
* The mask specifies which register(s) are to be transferred
* as 32-bit ARMwords. The mask has been extended to support
* more than 32 registers in RDI2.
*
* Params:
* Input: mh handle identifies processor
* Input: mode mode defines register context
* ARM
* RDIMode_Curr use the current mode
* Other values match the mode bits of the PSR.
* PICCOLO *** Use of Piccolo is obsolete ***
* As for RDI_CPUreadProc
* Input: mask[] bits defining which registers are to be
* transferred. These bits can be ORed to read any
* combination of registers.
* ARM
* b0 - b14 r0 - r14
* b15 Reserved. Bit 15 must be clear;
* targets must ignore bit 15.
* RDIReg_PC PC
* RDIReg_CPSR CPSR register
* RDIReg_SPSR SPSR register
* PICCOLO *** Use of Piccolo is obsolete ***
* As for RDI_CPUreadProc
* Input: state[] source array of ARMwords
* InOut: none
* Output: none
*
* Returns:
* OK: RDIError_NoError
* Not OK: RDIError_ReadOnly - if writing is not allowed at this time
* Error: error code
*/
typedef int RDI150_CPUWriteProc(
RDI_ModuleHandle mh, unsigned mode, unsigned32 mask, ARMword const *state);
/*
* Function: RDI_CPreadProc
* Purpose: Read the register content from the specified coprocessor.
* The mask specifies which register(s) are to be transferred
* as 32-bit ARMwords. The mask has been extended to support
* more than 32 registers in RDI2.
*
* Each coprocessor will have its own register set defined in
* another header file. The actual registers transferred, and
* their size is dependent on the coprocessor specified.
*
* Params:
* Input: mh handle identifies processor
* Input: CPnum coprocessor number for this processor
* Input mask[] bits define which registers are to be transferred
* InOut: none
* Output: state[] destination array for register values
*
* Returns:
* OK: RDIError_NoError
* Error: error code
*/
typedef int RDI150_CPReadProc(
RDI_ModuleHandle mh, unsigned CPnum, unsigned32 mask, ARMword *state);
/*
* Function: RDI_CPwriteProc
* Purpose: Write the register content to the specified coprocessor.
* The mask specifies which register(s) are to be transferred
* as 32-bit ARMwords. The mask has been extended to support
* more than 32 registers in RDI2.
*
* Each coprocessor will have its own register set defined in
* another header file. The actual registers transferred, and
* their size is dependent on the coprocessor specified.
*
* Params:
* Input: mh handle identifies processor
* Input: CPnum coprocessor number for this processor
* Input mask[] bits define which registers are to be transferred
* Input: state[] source array of register values
* InOut: none
* Output: none
*
* Returns:
* OK: RDIError_NoError
* Error: error code
*/
typedef int RDI150_CPWriteProc(
RDI_ModuleHandle mh, unsigned CPnum, unsigned32 mask, ARMword const *state);
/*
* Function: RDI_SetBreakProc
* Purpose: Set a breakpoint in the debuggee.
*
* Params:
* Input: mh handle identifies processor
* Input: address address of breakpoint
* 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 (address+bound), incl
* RDIPoint_OUT not in the range from address to (address+bound),incl
* RDIPoint_MASK halt execution if (pc & bound) = address
* RDIPoint_16Bit if set breakpoint is on 16-bit (Thumb) instruction
* RDIPoint_Conditional if set breakpoint only occurs when the
* instructions condition is true.
*
* Input: bound upper address range
* Input: thread thread used by OS (set to RDI_NoHandle for global)
* InOut: none
* Output: *handle A handle to identify the breakpoint
*
* Returns:
* OK: RDIError_NoError
* OK: RDIError_NoMorePoints - successful,
* but no more points available
* Error: RDIError_CantSetPoint
*/
typedef int RDI150_SetBreakProc(
RDI_ModuleHandle mh, ARMword address, unsigned type, ARMword bound,
RDI_ThreadHandle thread, RDI_PointHandle *handle);
/*
* Function: RDI_ClearBreakProc
* Purpose: Clear a breakpoint in the debuggee.
*
* Params:
* Input: mh identifies processor
* Input: handle identifies breakpoint
* InOut: none
* Output: none
*
* Returns:
* OK: RDIError_NoError
* Error: RDIError_NoSuchPoint
*/
typedef int RDI150_ClearBreakProc(RDI_ModuleHandle mh, RDI_PointHandle handle);
/*
* Function: RDI_SetWatchProc
* Purpose: Set a watchpoint in the debuggee.
*
* Params:
* Input: mh handle identifies processor
* 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 (address+bound), inclus
* RDIPoint_OUT not in the range from address to (address+bound),incl
* RDIPoint_MASK halt execution if (pc & bound) = address
*
* Input: datatype one of RDIWatch_ data types
* Input: bound upper address range
* Input: thread thread used by OS (set to RDI_NoHandle for global)
* 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 RDI150_SetWatchProc(
RDI_ModuleHandle mh, ARMword address, unsigned type, unsigned datatype,
ARMword bound, RDI_ThreadHandle thread, RDI_PointHandle *handle);
/*
* Function: RDI_ClearWatchProc
* Purpose: Clear a watchpoint in the debuggee.
*
* Params:
* Input: mh identifies processor
* Input: handle identifies watchpoint
* InOut: none
* Output: none
*
* Returns:
* OK: RDIError_NoError
* Error: RDIError_NoSuchPoint
*/
typedef int RDI150_ClearWatchProc(RDI_ModuleHandle mh, 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:
* Input: agent Identifies the debug agent.
* Input: stop_others
* TRUE => Only run the specified processor (*mh). All
* other processors remain halted
* FALSE =>Start the whole target running
*
* InOut: *mh
* In: (stop_others == TRUE):
* identifies a specific processor to execute
* (stop_others == FALSE):
* ignored
*
* Out: Handle of the processor that caused the exit.
* If no specific processor caused the exit, this is the
* handle of any valid processor.
*
* 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)
*
* Error: RDIError_UnimplementedMessage under the following conditions
* if stop_others = TRUE and *mh = RDINoHandle
* or
* if stop_others = TRUE and stopping of individual
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -