From a44b042507e4e196e08b4367364526371053591f Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Thu, 24 Mar 2011 08:56:02 +0800 Subject: fix incoming message packet acknowlegement parsing logic --- Debugger/debug_comm.S | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Debugger/debug_comm.S b/Debugger/debug_comm.S index db9ac16..86ee823 100644 --- a/Debugger/debug_comm.S +++ b/Debugger/debug_comm.S @@ -756,6 +756,15 @@ _hasMsg2Copy: ldr r5, =debug_msgRxBufPtr ldr r5, [r5] /* Rx buffer Start Address */ +/* Need to account for Packet Acknowledgement */ +1: ldrb r0, [r5] + teq r0, #MSGBUF_NAKCHAR /* Look for '-' */ + beq exit_dbg__getMsgError /* FIXME: We can't handle retransmission, flag message error */ + teq r0, #MSGBUF_ACKCHAR /* Look for '+' */ + addeq r5, r5, #1 /* Adjust Buffer Start Pointer (excl '+') */ + subeq r4, r4, #1 /* Adjust Message Length */ + beq 1b /* Skip all Packet Acknowledgements */ + /* Note: Here we assume that we won't get a single ACK '+' or NAK '-' character message. * If we do, it'll be flagged as an error */ @@ -768,15 +777,6 @@ _hasMsg2Copy: mov r1, #0 strb r1, [r5, r2] /* Zero out '#' char for checksum calc later */ -/* Need to account for Packet Acknowledgement */ -1: ldrb r0, [r5] - teq r0, #MSGBUF_NAKCHAR /* Look for '-' */ - beq exit_dbg__getMsgError /* FIXME: We can't handle retransmission, flag message error */ - teq r0, #MSGBUF_ACKCHAR /* Look for '+' */ - addeq r5, r5, #1 /* Adjust Buffer Start Pointer (excl '+') */ - subeq r4, r4, #1 /* Adjust Message Length */ - beq 1b /* Skip all Packet Acknowledgements */ - #ifdef CHECK_GDBSTARTCHAR /* Checked in dbg__bkpt_waitCMD */ ldrb r0, [r5] -- cgit v1.2.3 From 13d2797ab2263a0703668feb8208eb3911524232 Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Thu, 24 Mar 2011 09:29:15 +0800 Subject: rewrite char2hex to avoid trashing register r1 --- Debugger/debug_comm.S | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/Debugger/debug_comm.S b/Debugger/debug_comm.S index 86ee823..af02d16 100644 --- a/Debugger/debug_comm.S +++ b/Debugger/debug_comm.S @@ -133,29 +133,34 @@ hex2char: * equivalent byte sized hex value in R0(7:0). * It accepts lowercase and uppercase ASCII Hex char inputs. * Invalid inputs return -1 as the value +* On entry: + * R0: ASCII character + * On exit: + * R0: Hex value */ .global char2hex char2hex: - and r1, r0, #BYTE0 /* make sure that input is sane */ - mov r0, #-1 /* Initialize Return value to Error value */ - cmp r1, #'0' - blo exit_char2hex - cmp r1, #'9' + and r0, r0, #BYTE0 /* make sure that input is sane */ + cmp r0, #'0' + blo char2hex_error + cmp r0, #'9' bls perform_char2hex - cmp r1, #'A' - blo exit_char2hex - cmp r1, #'F' + cmp r0, #'A' + blo char2hex_error + cmp r0, #'F' bls perform_char2hex - cmp r1, #'a' - blo exit_char2hex - cmp r1, #'f' - bhi exit_char2hex + cmp r0, #'a' + blo char2hex_error + cmp r0, #'f' + bhi char2hex_error /* Validated Hex Char */ perform_char2hex: - mov r0, r1 /* restore hex char */ - _char2hex r0 -exit_char2hex: + _char2hex r0 /* Return hex value in R0 */ + bx lr + +char2hex_error: + mov r0, #-1 /* Set Return value to Error value */ bx lr /* byte2ascii_cont -- cgit v1.2.3 From e1e0d31f9aad0ed6c64f61208e94cef43e256de7 Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Thu, 24 Mar 2011 10:43:07 +0800 Subject: cleaned up register get and set routines --- Debugger/debug_stub.S | 64 ++++++++++++++++++++++++++------------------------- Debugger/debug_stub.h | 32 +++++++++++++++++++++++--- 2 files changed, 62 insertions(+), 34 deletions(-) diff --git a/Debugger/debug_stub.S b/Debugger/debug_stub.S index 9943ba2..de126be 100644 --- a/Debugger/debug_stub.S +++ b/Debugger/debug_stub.S @@ -792,7 +792,7 @@ _dbg__cmd_GetOneReg: bne __dbg__procCmdParamError /* Unexpected input, report error */ ldrb r0, [r0] /* Load Register index parameter */ teq r0, #MSGBUF_CPSRREG /* Check for CPSR register indicator */ - moveq r0, #DBGSTACK_USERCPSR_OFFSET /* Put offset from User Registers (-1) into index, so that after adjustment it points to CPSR slot */ + moveq r0, #REG_CPSR /* Use CPSR Enum (-1) */ beq _dbg__proc_getRegister /* Handle User CPSR */ bl char2hex /* Convert to Hex value (assume input is valid) */ cmp r0, #NIBBLE0 /* sanity check, (though it is not foolproof as input char in 0x0-0xF (ctrl-chars) will pass through) */ @@ -808,10 +808,10 @@ _dbg__proc_getRegister: ldmfd sp!, {pc} /* _dbg_outputOneRegValue - * Given Register Index (-1: CPSR, 0-F: R0-R15), output hex char to buffer + * Given Register Enum (-1: CPSR, 0-F: R0-R15), output hex char to buffer * On entry: * r0: output message buffer pointer - * r1: register index (-1, 0-F) + * r1: register enum (-1, 0-F) * On exit: * r0: updated (points to next character slot at end of Output Buffer) * r1: original output message buffer pointer @@ -819,7 +819,7 @@ _dbg__proc_getRegister: */ _dbg_outputOneRegValue: stmfd sp!, {lr} - add r2, r1, #DBGSTACK_USERREG_INDEX /* Convert register index to Debug Stack index */ + add r2, r1, #DBGSTACK_USERREG_INDEX /* Convert register enum to Debug Stack index */ _getdbgregisterfromindex r2, r1 /* Retrieve Register contents into R1 */ #ifdef __BIG_ENDIAN__ bl word2ascii_be /* Convert and put hex chars into Output Message Buffer */ @@ -846,30 +846,32 @@ _dbg__cmd_GetAllRegs: _dbg_outputMsgValidResponse /* R0: address of output message buffer data pointer (after response prefix) */ /* We must return R0-R15, then CPSR */ - mov r3, #DBGSTACK_USERREG_INDEX /* Output User Register Values first */ + mov r3, #REG_R0 /* Output User Register Values first */ 1: mov r1, r3 bl _dbg_outputOneRegValue /* update output buffer */ add r3, r3, #1 /* increment index */ - cmp r3, #0xF - ble 1b /* process all the registers */ - - mov r1, #DBGSTACK_USERCPSR_OFFSET /* Output User CPSR Value lasat */ + cmp r3, #REG_PC + bls 1b /* process all the registers */ +_get_cpsr: + mov r1, #REG_CPSR /* Output User CPSR Value last */ bl _dbg_outputOneRegValue /* update output buffer */ _asciiz r0, r1 bl dbg__putDebugMsg /* Send response to the GDB server */ ldmfd sp!, {pc} -/* Internal Routine: Do not call directly - * Shared by _dbg__cmd_SetOneReg and _dbg__cmd_SetAllRegs - * On entry: +/* _dbg_setOneRegValue + * Given Register Enum (-1: CPSR, 0-F: R0-R15), set register to buffer contents + * On entry: * r0: parameter buffer pointer - * r2: Register Index in Debug Stack (NOT Register Enum) - * On exit: - * r0, r2, r3: destroyed + * r1: register enum (-1, 0-F) + * On exit: + * r0: (Updated) Address of parameter in buffer + * r1, r2, r3: destroyed */ -__dbg_setRegister_fromIndex_withBufferVal: +_dbg_setOneRegValue: stmfd sp!, {lr} + add r2, r1, #DBGSTACK_USERREG_INDEX /* Convert register enum to Debug Stack index */ #ifdef __BIG_ENDIAN__ bl ascii2word_be #else @@ -877,6 +879,7 @@ __dbg_setRegister_fromIndex_withBufferVal: #endif /* R0: value, R1: pointer to next char in buffer */ _setdbgregisterfromindex r2, r0, r3 /* Set Register contents in R0, using index in R2, and scratch register R3 */ + mov r0, r1 /* Copy buffer pointer to next parameter to R0 for return value */ ldmfd sp!, {pc} @@ -891,28 +894,27 @@ __dbg_setRegister_fromIndex_withBufferVal: * r0, r1, r2, r3: destroyed * */ - _dbg__cmd_SetOneReg: stmfd sp!, {lr} bl __dbg__cmdParamLen teq r1, #CMD_REG_SETONE_PARAMLEN /* Check for correct length */ bne __dbg__procCmdParamError /* Unexpected input, report error */ mov r3, r0 /* Keep parameter buffer address in R3 */ - ldrb r1, [r3], #1 /* Load Register index parameter */ + ldrb r1, [r3], #1 /* Load Register enum parameter */ _check_msgassignment r3 bne __dbg__procCmdParamError /* Can't find '=' */ - mov r0, r1 /* Move register index to R0 for subsequent processing */ - teq r0, #MSGBUF_CPSRREG /* Check for CPSR register indicator */ - moveq r0, #DBGSTACK_USERCPSR_OFFSET /* Put offset from User Registers (-1) into index, so that after adjustment it points to CPSR slot */ + teq r1, #MSGBUF_CPSRREG /* Check for CPSR register indicator */ + moveq r1, #REG_CPSR /* Use CPSR enum (-1) */ beq _dbg__proc_setRegister /* Handle User CPSR */ + mov r0, r1 /* Move register enum to R0 for subsequent processing */ bl char2hex /* Convert to Hex value (assume input is valid) */ cmp r0, #NIBBLE0 /* sanity check, (though it is not foolproof as input char in 0x0-0xF (ctrl-chars) will pass through) */ bhi __dbg__procCmdParamError /* Non-hex char, report error */ + mov r1, r0 /* move register enum to R1 to call _dbg_setOneRegValue */ _dbg__proc_setRegister: - add r2, r0, #DBGSTACK_USERREG_INDEX /* Convert register index to Debug Stack index, keep in R2 */ mov r0, r3 /* Retrieve parameter buffer pointer */ - bl __dbg_setRegister_fromIndex_withBufferVal + bl _dbg_setOneRegValue b __dbg__procCmdOk /* _dbg__cmd_SetAllReg @@ -930,17 +932,17 @@ _dbg__cmd_SetAllRegs: bl __dbg__cmdParamLen /* R0: pointer to parameters in buffer */ teq r1, #CMD_REG_SETALL_PARAMLEN /* Check for correct length */ bne __dbg__procCmdParamError /* Unexpected input, report error */ - mov r2, #DBGSTACK_USERREG_INDEX /* R2: register index, starting with R0 */ -1: bl __dbg_setRegister_fromIndex_withBufferVal - mov r0, r1 /* setup R0 for next ascii2word call */ - add r2, r2, #1 /* increment index */ - cmp r2, #DBGSTACK_USERPC_INDEX + mov r4, #REG_R0 /* R4: register enum, starting with enum for R0 */ +1: mov r1, r4 /* Copy enum to R1; R0 already points to current parameter */ + bl _dbg_setOneRegValue /* R0: next parameter address pointer */ + add r4, r4, #1 /* increment index */ + cmp r4, #REG_PC bls 1b _set_cpsr: - mov r2, #DBGSTACK_USERCPSR_INDEX /* R2: CPSR Index */ - bl __dbg_setRegister_fromIndex_withBufferVal - ldrb r0, [r1] + mov r1, #REG_CPSR /* Use CPSR enum (-1) */ + bl _dbg_setOneRegValue /* R0: next parameter address pointer */ + ldrb r0, [r0] teq r0, #0 /* Look for ASCIIZ character to terminate loop */ beq __dbg__procCmdOk bne __dbg__procCmdParamError /* Unexpected input, report error */ diff --git a/Debugger/debug_stub.h b/Debugger/debug_stub.h index 7dc9aa8..229c6d6 100644 --- a/Debugger/debug_stub.h +++ b/Debugger/debug_stub.h @@ -147,9 +147,9 @@ #define DBGSTACK_NEXTINSTR_INDEX 0 /* Next Instruction Address is at index 0 from bottom of Debug Stack */ #define DBGSTACK_USERCPSR_INDEX 1 /* User CPSR (SPSR_UNDEF) is at index 1 from bottom of Debug Stack */ #define DBGSTACK_USERREG_INDEX 2 /* R0 starts at index 2 from bottom of Debug Stack */ -#define DBGSTACK_USERSP_INDEX (DBGSTACK_USERREG_INDEX + 13) /* SP is R13 */ -#define DBGSTACK_USERPC_INDEX (DBGSTACK_USERREG_INDEX + 15) /* PC is R15 */ -#define DBGSTACK_USERCPSR_OFFSET (DBGSTACK_USERCPSR_INDEX-DBGSTACK_USERREG_INDEX) /* = -1, offset for calculating Debug Stack index */ +#define DBGSTACK_USERSP_INDEX (DBGSTACK_USERREG_INDEX + REG_SP) /* SP is R13 */ +#define DBGSTACK_USERLR_INDEX (DBGSTACK_USERREG_INDEX + REG_LR) /* LR is R14 */ +#define DBGSTACK_USERPC_INDEX (DBGSTACK_USERREG_INDEX + REG_PC) /* PC is R15 */ /*@}*/ /** @name Bitmask Definitions. @@ -252,6 +252,32 @@ ENUM_VAL(MSG_UNKNOWNPARAM) /**< Unrecognized Parameter Error. */ ENUM_VAL(MSG_UNKNOWNBRKPT) /**< Unrecognized Breakpoint Error. */ ENUM_END(dbg_msg_errno) +/** Register Enums + * + * Register Enums. + * The enums must be consecutive, starting from -1 + */ +ENUM_BEGIN +ENUM_VALASSIGN(REG_CPSR, -1) /**< Previous Mode CPSR */ +ENUM_VAL(REG_R0) /**< User Reg R0 */ +ENUM_VAL(REG_R1) /**< User Reg R1 */ +ENUM_VAL(REG_R2) /**< User Reg R2 */ +ENUM_VAL(REG_R3) /**< User Reg R3 */ +ENUM_VAL(REG_R4) /**< User Reg R4 */ +ENUM_VAL(REG_R5) /**< User Reg R5 */ +ENUM_VAL(REG_R6) /**< User Reg R6 */ +ENUM_VAL(REG_R7) /**< User Reg R7 */ +ENUM_VAL(REG_R8) /**< User Reg R8 */ +ENUM_VAL(REG_R9) /**< User Reg R9 */ +ENUM_VAL(REG_R10) /**< User Reg R10 */ +ENUM_VAL(REG_R11) /**< User Reg R11 */ +ENUM_VAL(REG_R12) /**< User Reg R12 */ +ENUM_VAL(REG_SP) /**< Previous Mode SP (R13) */ +ENUM_VAL(REG_LR) /**< Previous Mode LR (R14) */ +ENUM_VAL(REG_PC) /**< Program Counter (R15) */ + +ENUM_END(register_enum_t) + #ifndef __ASSEMBLY__ -- cgit v1.2.3 From ccc74cd2f443d57b3edc29a94935ed8f13ffef46 Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Thu, 24 Mar 2011 11:01:26 +0800 Subject: cater for variable length address parameters --- Debugger/debug_stub.S | 11 ++++++++++- Debugger/debug_stub.h | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Debugger/debug_stub.S b/Debugger/debug_stub.S index de126be..fb64b51 100644 --- a/Debugger/debug_stub.S +++ b/Debugger/debug_stub.S @@ -970,9 +970,12 @@ _dbg__nop: _dbg__cmd_ReadMem: stmfd sp!, {lr} bl __dbg__cmdParamLen +#if 0 teq r1, #CMD_MEM_READ_PARAMLEN /* Check for correct length */ bne __dbg__procCmdParamError /* Unexpected input, report error */ bl ascii2word_be /* convert ASCII address location to Hex (in R0), R1 has address of next buffer char */ +#endif + bl ascii2hex_varlen_be /* convert ASCII address to Hex (in R0), R1 has address of next buffer char */ mov r3, r0 /* Keep Address location in R3 */ _check_msgseparator r1 bne __dbg__procCmdParamError /* Can't find ',' */ @@ -1005,10 +1008,13 @@ _dbg__cmd_ReadMem: _dbg__cmd_WriteMem: stmfd sp!, {lr} bl __dbg__cmdParamLen +#if 0 cmp r1, #CMD_MEM_WRITE_MINPARAMLEN /* Check for correct (minimum) length */ blo __dbg__procCmdParamError /* Unexpected input, report error */ sub r4, r1, #CMD_MEM_WRITE_MINPARAMLEN /* R4: Number of ASCII Hex chars for byte writes */ bl ascii2word_be /* convert ASCII address location to Hex (in R0), R1 has address of next buffer char */ +#endif + bl ascii2hex_varlen_be /* convert ASCII address to Hex (in R0), R1 has address of next buffer char */ mov r3, r0 /* Keep Address location in R3 */ _check_msgseparator r1 bne __dbg__procCmdParamError /* Can't find ',' */ @@ -1044,10 +1050,13 @@ _dbg__cmd_Continue: bl __dbg__cmdParamLen cmp r1, #CMD_REG_CONTINUE_PARAMLEN /* Check for correct parameter length */ beq _dbg__cmd_processContinue /* Continue from current PC */ +#if 0 cmp r1, #CMD_REG_CONTINUEFROM_PARAMLEN /* Check for correct parameter length */ bne __dbg__procCmdParamError /* Unexpected input, report error */ - /* Continue from Specified Address */ bl ascii2word_be /* convert ASCII address location to Hex (in R0), R1 has address of next buffer char */ +#endif + bl ascii2hex_varlen_be /* convert ASCII address to Hex (in R0), R1 has address of next buffer char */ + /* Continue from Specified Address */ mov r2, #DBGSTACK_NEXTINSTR_INDEX /* The Next Instruction Pointer for Resume is in index 0 of the Debug Stack */ _setdbgregisterfromindex r2, r0, r1 /* Set Register contents in R0, using index in R2, and scratch register R1 */ diff --git a/Debugger/debug_stub.h b/Debugger/debug_stub.h index 229c6d6..9d97705 100644 --- a/Debugger/debug_stub.h +++ b/Debugger/debug_stub.h @@ -92,6 +92,8 @@ /** @name Debug Memory Command Constants. * * Debug Memory Command + * FIXME: These limits are not enforced by the GDB client, it truncates addresses and lengths to remove leading '0's + * The PARAMLEN constants would probably be removed */ /*@{*/ #define CMD_NUMITEMS_PARAMLEN 4 /* 16-bit ASCII Hex Value */ @@ -110,7 +112,6 @@ */ /*@{*/ #define CMD_REG_CONTINUE_PARAMLEN 0 -#define CMD_REG_CONTINUEFROM_PARAMLEN CMD_REG_REGPARAMLEN /* Address length is equivalent to reg param len */ /*@}*/ -- cgit v1.2.3 From 113e399ff15417e74358698847efd8f6d30c5d32 Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Thu, 24 Mar 2011 11:15:40 +0800 Subject: ascii2hex_varlen_be should not autoincrement buffer pointer --- Debugger/debug_comm.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Debugger/debug_comm.S b/Debugger/debug_comm.S index af02d16..4d41e24 100644 --- a/Debugger/debug_comm.S +++ b/Debugger/debug_comm.S @@ -331,12 +331,13 @@ ascii2hex_varlen_be: mov r3, #CMD_REG_REGPARAMLEN /* Set max count to 8 (Max Register size) */ mov r1, r0 /* Use R1 as ASCII buffer pointer */ mov r2, #0 /* Initialize Cummulative Results */ -2: ldrb r0, [r1], #1 /* Load ASCII char for Hex Value */ +2: ldrb r0, [r1] /* Load ASCII char for Hex Value */ bl char2hex /* on return, hex value in R0, -1 for error */ cmp r0, #-1 beq _exit_ascii2hex_varlen orr r2, r0, r2, lsl #4 /* combined byte value */ subs r3, r3, #1 /* Decrement Counter */ + add r1, r1, #1 /* Go to next char slot */ bne 2b _exit_ascii2hex_varlen: mov r0, r2 /* Return results in R0 */ -- cgit v1.2.3 From ed6853178816f14734f3ba02f05e7eeabdb1337d Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Thu, 24 Mar 2011 11:53:32 +0800 Subject: added fpscr register get and set support to make gdb happy --- Debugger/debug_stub.S | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Debugger/debug_stub.S b/Debugger/debug_stub.S index fb64b51..3c3670a 100644 --- a/Debugger/debug_stub.S +++ b/Debugger/debug_stub.S @@ -830,7 +830,7 @@ _dbg_outputOneRegValue: /* _dbg__cmd_GetAllRegs * Get All Register Values Command Handler - * Output Buffer returns register values in the order: User R0, R1, R2, ..., R15, CPSR + * Output Buffer returns register values in the order: User R0, R1, R2, ..., R15, FPSCR (dummy), CPSR * On entry: * r0: parameter buffer pointer (contents after '$' and '') * (no parameters) @@ -853,6 +853,14 @@ _dbg__cmd_GetAllRegs: cmp r3, #REG_PC bls 1b /* process all the registers */ _get_cpsr: + /* Output Dummy FPSCR value */ + mov r1, #0 +#ifdef __BIG_ENDIAN__ + bl word2ascii_be /* Convert and put hex chars into Output Message Buffer */ +#else + bl word2ascii_le /* Convert and put hex chars into Output Message Buffer */ +#endif + mov r1, #REG_CPSR /* Output User CPSR Value last */ bl _dbg_outputOneRegValue /* update output buffer */ @@ -927,7 +935,7 @@ _dbg__proc_setRegister: * */ _dbg__cmd_SetAllRegs: -/* FIXME: Assumes that the registers are in the sequence R0, R1, ... R15, CPSR -- May not be GDB ordering */ + /* Assumes that the registers are in the sequence R0, R1, ... R15, FPSCR (ignored), CPSR */ stmfd sp!, {lr} bl __dbg__cmdParamLen /* R0: pointer to parameters in buffer */ teq r1, #CMD_REG_SETALL_PARAMLEN /* Check for correct length */ @@ -940,6 +948,14 @@ _dbg__cmd_SetAllRegs: bls 1b _set_cpsr: + /* Read dummy FPSCR value (ignored) */ +#ifdef __BIG_ENDIAN__ + bl ascii2word_be +#else + bl ascii2word_le +#endif + mov r0, r1 /* Copy buffer pointer to next parameter to R0 for return value */ + mov r1, #REG_CPSR /* Use CPSR enum (-1) */ bl _dbg_setOneRegValue /* R0: next parameter address pointer */ ldrb r0, [r0] -- cgit v1.2.3 From f60b520e4da4d19dc43a5058168e668acdaaee00 Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Thu, 24 Mar 2011 12:02:03 +0800 Subject: undo fpscr support as gdb complains that packet reply is too long --- Debugger/debug_stub.S | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Debugger/debug_stub.S b/Debugger/debug_stub.S index 3c3670a..55b2183 100644 --- a/Debugger/debug_stub.S +++ b/Debugger/debug_stub.S @@ -853,6 +853,8 @@ _dbg__cmd_GetAllRegs: cmp r3, #REG_PC bls 1b /* process all the registers */ _get_cpsr: +#if 0 + /* GDB was not happy when this was added */ /* Output Dummy FPSCR value */ mov r1, #0 #ifdef __BIG_ENDIAN__ @@ -860,7 +862,7 @@ _get_cpsr: #else bl word2ascii_le /* Convert and put hex chars into Output Message Buffer */ #endif - +#endif mov r1, #REG_CPSR /* Output User CPSR Value last */ bl _dbg_outputOneRegValue /* update output buffer */ @@ -935,7 +937,7 @@ _dbg__proc_setRegister: * */ _dbg__cmd_SetAllRegs: - /* Assumes that the registers are in the sequence R0, R1, ... R15, FPSCR (ignored), CPSR */ + /* Assumes that the registers are in the sequence R0, R1, ... R15, CPSR */ stmfd sp!, {lr} bl __dbg__cmdParamLen /* R0: pointer to parameters in buffer */ teq r1, #CMD_REG_SETALL_PARAMLEN /* Check for correct length */ @@ -948,6 +950,8 @@ _dbg__cmd_SetAllRegs: bls 1b _set_cpsr: +#if 0 + /* GDB was not happy when this was added */ /* Read dummy FPSCR value (ignored) */ #ifdef __BIG_ENDIAN__ bl ascii2word_be @@ -955,7 +959,7 @@ _set_cpsr: bl ascii2word_le #endif mov r0, r1 /* Copy buffer pointer to next parameter to R0 for return value */ - +#endif mov r1, #REG_CPSR /* Use CPSR enum (-1) */ bl _dbg_setOneRegValue /* R0: next parameter address pointer */ ldrb r0, [r0] -- cgit v1.2.3