📄 angel_reasons.h
字号:
* Return: (word status)
*
* 'status' is RDIError_NoError if the configuration can be downloaded,
* non-zero otherwise.
*
* NOTE: Equivalent to RDIInfo_DownLoad.
*/
#define ADP_Ctrl_Download_Data ADPSUBREASON(CI_HADP,15)
/* ADP_Ctrl_Download_Data
* ----------------------
* Summary: Loads configuration data.
*
* Arguments:
* Send: (word nbytes, words data)
* Return: (word status)
*
* 'nbytes' is the number of *bytes* being sent.
* 'data' is the configuration data. NOTE: data must not cause the buffer
* size to exceed the maximum allowed buffer size.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
*
* NOTE: Equivalent to RDP_LoadConfigData. Should only be used if
* ADP_ICEM_AddConfig didn't return an error.
*/
#define ADP_Ctrl_Download_Agent ADPSUBREASON(CI_HADP,16)
/* ADP_Ctrl_Download_Agent
* -----------------------
* Summary: Prepares Debug Agent to receive configuration data which it
* should interpret as a new version of the Debug Agent code.
*
* Arguments:
* Send: (word loadaddress, word size)
* Return: (word status)
*
* 'loadaddress' is the address where the new Debug Agent code should be
* loaded.
* 'size' is the number of bytes of Debug Agent code to be loaded.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
*
* NOTE: Equivalent to RDP_LoadAgent. The data will be downloaded using
* ADP_Ctrl_Download_Data. The new agent is started with ADP_Ctrl_Start_Agent
*/
#define ADP_Ctrl_Start_Agent ADPSUBREASON(CI_HADP,17)
/* ADP_Ctrl_Start_Agent
* -----------------------
* Summary: Instruct Debug Agent to begin execution of new agent,
* which has been downloaded by ADP_Ctrl_Download_Agent.
*
* Arguments:
* Send: (word startaddress)
* Return: (word status)
*
* 'startaddress' is the address where the new Debug Agent code should be
* entered, and must satisfy:
* (loadaddress <= startaddress <= (loadaddress + size))
* where 'loadaddress' and 'size' were specified in the
* ADP_Ctrl_Download_Agent message.
*
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
*/
#define ADP_Ctrl_SetTopMem ADPSUBREASON(CI_HADP,18)
/* ADP_Ctrl_SetTopMem
* ------------------
* Summary: Sets the top of memory for ICEman2 systems, so that the C Library
* can allocate the stack in the correct place on startup.
*
* Arguments:
* Send: (word mem_top)
* Return: (word status)
*
* This request should only be supported by ICEman2. Standard Angel systems
* should return an error (unrecognised is fine).
*/
#define ADP_Read ADPREASON(CI_HADP,3)
#define ADP_ReadHeaderSize (ADP_DEFAULT_HEADER_SIZE + 2*sizeof(word))
#define ADP_ReadExtHeaderSize (ADP_DEFAULT_HEADER_SIZE + 3*sizeof(word))
/* ADP_Read
* --------
* Summary: Request for a transer of memory contents from the target to the
* debugger.
*
* Arguments:
* Send: (word address, word nbytes)
* Return: (word status, word rnbytes [, bytes data])
*
* 'address' is the address from which memory transer should start.
* 'nbytes' is the number of bytes to transfer.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* 'rnbytes' holds the number of requested bytes NOT read (i.e. zero
* indicates success, non-zero indicates an error).
* 'data' is the number of bytes requested minus 'rnbytes'.
*/
#define ADP_Write ADPREASON(CI_HADP,4)
#define ADP_WriteHeaderSize (ADP_DEFAULT_HEADER_SIZE + 2*sizeof(word))
#define ADP_WriteExtHeaderSize (ADP_DEFAULT_HEADER_SIZE + 3*sizeof(word))
/* ADP_Write
* ---------
* Summary: Request for a transfer of memory contents from the debugger to
* the target.
*
* Arguments:
* Send: (word address, word nbytes, bytes data)
* Return: (word status [, word rnbytes])
*
* 'address' is the address from which memory transer should start.
* 'nbytes' is the number of bytes to transfer.
* 'data' holds the bytes to be transferred.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* 'rnbytes' holds the number of requested bytes NOT written (i.e. zero
* indicates success, non-zero indicates an error) if status indicated an
* error.
*/
#define ADP_CPUread ADPREASON(CI_HADP,5)
/* ADP_CPUread
* -----------
* Summary: This is a request to read values in the CPU.
*
* Arguments:
* Send: (byte mode, word mask)
* Return: (word status, words data)
*
* 'mode' defines the processor mode from which the transfer should be made.
* It is described in more detail below.
* 'mask' indicates which registers should be transferred. Setting a bit to
* one will cause the designated register to be transferred. The details
* of mask are specified below.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* 'data' holds the values of the registers on successful completion,
* otherwise it just holds rubbish. The lowest numbered register is
* transferred first. NOTE: data must not cause the buffer size to exceed
* the maximum allowed buffer size.
*/
/* 'mode':- */
/* The mode number is the same as the mode number used by an ARM; a value of
255 indicates the current mode. */
#define ADP_CPUmode_Current (255)
/* 26bit user mode. */
#define ADP_CPUread_26bitUser (0x0)
/* 26bit FIQ mode. */
#define ADP_CPUread_26bitFIQ (0x1)
/* 26bit IRQ mode. */
#define ADP_CPUread_26bitIRQ (0x2)
/* 26bit Supervisor mode. */
#define ADP_CPUread_26bitSVC (0x3)
/* 32bit user mode. */
#define ADP_CPUread_32bitUser (0x10)
/* 32bit FIQ mode. */
#define ADP_CPUread_32bitFIQ (0x11)
/* 32bit IRQ mode. */
#define ADP_CPUread_32bitIRQ (0x12)
/* 32bit Supervisor mode. */
#define ADP_CPUread_32bitSVC (0x13)
/* 32bit Abort mode. */
#define ADP_CPUread_32bitAbort (0x17)
/* 32bit Undefined mode. */
#define ADP_CPUread_32bitUndef (0x1B)
/* #32bit System mode - Added in Architecture 4 ARMs e.g.ARM7TDMI */
#define ADP_CPUread_32bitSystem (0x1F)
/* 'mask':- */
/* Request registers RO-R14. */
#define ADP_CPUread_RegsMask (0x7FFF)
/* Request Program Counter (including mode and flag bits in 26-bit modes. */
#define ADP_CPUread_PCmode (1 << 15)
/* Request Program Counter (without mode and flag bits in 26-bit modes. */
#define ADP_CPUread_PCnomode (1 << 16)
/* Requests the transfer of the CPSR */
#define ADP_CPUread_CPSR (1 << 17)
/* In processor modes with an SPSR(non-user modes), bit 19 requests its
transfer */
#define ADP_CPUread_SPSR (1 << 18)
#define ADP_CPUwrite ADPREASON(CI_HADP,6)
/* ADP_CPUwrite
* ------------
* Summary: This is a request to write values to the CPU.
*
* Arguments:
* Send: (byte mode, word mask, words data)
* Return: (word status)
*
* 'mode' defines the processor mode to which the transfer should be made.
* The mode number is the same as the mode number used by ARM; a value of
* 255 indicates the current mode. See ADP_CPUread above for more detail.
* 'mask' indicates which registers should be transferred. Setting a bit to
* one will cause the designated register to be transferred. The details
* of mask are specified above in ADP_CPUread.
* 'data' holds the values of the registers to be transferred. The first
* value is written to the lowest numbered register. NOTE: data must not
* cause the buffer size to exceed the maximum allowed buffer size.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
*/
#define ADP_CPread ADPREASON(CI_HADP,7)
/* ADP_CPread
* ----------
* Summary: This message requests a co-processors internal state.
*
* Arguments:
* Send: (byte CPnum, word mask)
* Return: (word status, words data)
*
* 'CPnum' is the number of the co-processor to transfer values from.
* 'mask' specifies which registers to transfer and is co-processor
* specific.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* 'data' holds the registers specified in 'mask' if successful, otherwise
* just rubbish. The lowest numbered register is transferred first.
* NOTE: data must not cause the buffer size to exceed the maximum allowed
* buffer size.
*/
#define ADP_CPwrite ADPREASON(CI_HADP,8)
/* ADP_CPwrite
* -----------
* Summary: This message requests a write to a co-processors internal state.
*
* Arguments:
* Send: (byte CPnum, word mask, words data)
* Return: (word status)
*
* 'CPnum' is the number of the co-processor to transfer values to.
* 'mask' specifies which registers to transfer and is co-processor
* specific.
* 'data' holds the values to transfer to the registers specified in 'mask'.
* The first value is written to the lowest numbered register.
* NOTE: data must not cause the buffer size to exceed the maximum allowed
* buffer size.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
*/
#define ADP_SetBreak ADPREASON(CI_HADP,9)
/* ADP_SetBreak
* ------------
* Summary: Sets a breakpoint.
*
* Arguments:
* Send: (word address, byte type [, word bound])
* Return: (word status, word pointhandle, word raddress, word rbound)
*
* 'address' is the address of the instruction to set the breakpoint on.
* 'type' specifies the sort of breakpoint and is described in more detail
* below.
* 'bound' is included if the least significant 4 bits of type are set to
* 5 or above (see below for more detail).
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* 'pointhandle' returns a handle to the breakpoint, it will be valid if bit
* 7 of 'type' is set. See below for more detail.
* 'raddress' is valid depending on 'type', see below for more detail.
* 'rbound' is valid depending on 'type', see below for more detail.
*/
/* 'type':- */
/* The least significant 4 bits define the sort of breakpoint to set:- */
/* Halt if the pc is equal to 'address'. */
#define ADP_SetBreak_EqualsAddress (0)
/* Halt if the pc is greater than 'address'. */
#define ADP_SetBreak_GreaterAddress (1)
/* Halt if the pc is greater than or equal to 'address'. */
#define ADP_SetBreak_GEqualsAddress (2)
/* Halt if the pc is less than 'address'. */
#define ADP_SetBreak_LessAddress (3)
/* Halt if the pc is less than or equal to 'address'. */
#define ADP_SetBreak_LEqualsAddress (4)
/* Halt if the pc is in the range from 'address' to 'bound' inclusive. */
#define ADP_SetBreak_Range (5)
/* Halt if the pc is not in the range from 'address' to 'bound' inclusive. */
#define ADP_SetBreak_NotRange (6)
/* Halt if (pc & 'bound') = 'address'. */
#define ADP_SetBreak_AndBound (7)
/* Bits 5,6 and 7 are used as follows :- */
/* If set this indicates that the breakpoint is on a 16bit (Thumb)
instruction rather than a 32bit (ARM) instruction. */
#define ADP_SetBreak_Thumb (1 << 4)
/* This requests that the breakpoint should be conditional (execution halts
only if the breakpointed instruction is executed, not if it is
conditionally skipped). If bit 5 is not set, execution halts whenever
the breakpointed instruction is reached (whether executed or skipped). */
#define ADP_SetBreak_Cond (1 << 5)
/* This requests a dry run: the breakpoint is not set and the 'raddress', and
if appropriate the 'rbound', that would be used, are returned (for
comparison and range breakpoints the address and bound used need not be
exactly as requested). A RDIError_NoError 'status' byte indicates that
resources are currently available to set the breakpoint, non-zero
indicates an error. RDIError_NoMorePoints indicates that the required
breakpoint resources are not currently available. */
#define ADP_SetBreak_DryRun (1 << 6)
/* If the request is successful, but there are no more breakpoint registers
(of the requested type), then the value RDIError_NoMorePoints is
returned. */
/* If a breakpoint is set on a location which already has a breakpoint, the
first breakpoint will be removed before the new breakpoint is set. */
#define ADP_ClearBreak ADPREASON(CI_HADP,10)
/* ADP_ClearBreak
* --------------
* Summary: Clears a breakpoint.
*
* Arguments:
* Send: (word pointhandle)
* Return: (word status)
*
* 'pointhandle' is a handle returned by a previous ADP_SetBreak.
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
*/
#define ADP_SetWatch ADPREASON(CI_HADP,11)
/* ADP_SetWatch
* ------------
* Summary: Sets a watchpoint.
*
* Arguments:
* Send: (word address, byte type, byte datatype [,word bound])
* Return: (word status, word pointhandle, word raddress, word rbound)
*
* 'address' is the address at which to set the watchpoint.
* 'type' is the type of watchpoint to set and is described in detail below.
* 'datatype' defines the sort of data access to watch for and is described
* in more detail below.
* 'bound' is included depending on the value of type (see description of
* type below).
* 'status' is RDIError_NoError to indicate success, non-zero otherwise.
* 'pointhandle' is valid depending on the value of type (see description
* of type below).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -