aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-07-20 12:51:48 +0800
committerTat-Chee Wan (USM)2011-07-20 12:51:48 +0800
commit2b908b104aa9be49c77627dfa3a57833e75cdc20 (patch)
treefc2526cdb75923619dbfda5485a25aca6c2b84f2
parent638903cb029c3b64c11bed2de2132880349b81c8 (diff)
revised get register logic
GDB will query for CPSR register value explicitly. Return dummy values for FP0-FP7, FPSCR
-rw-r--r--Debugger/debug_stub.S12
1 files changed, 9 insertions, 3 deletions
diff --git a/Debugger/debug_stub.S b/Debugger/debug_stub.S
index 7b8e2f3..90bc9ce 100644
--- a/Debugger/debug_stub.S
+++ b/Debugger/debug_stub.S
@@ -827,11 +827,15 @@ _dbg_outputOneRegValue:
moveq r2, #DBGSTACK_USERCPSR_INDEX /* convert register enum to Debug Stack index */
beq _retrieve_RegVal
+ bhi _exit_dbg_outputOneRegValue /* No match (reg enum > REG_CPSR), skip */
+
+#if 0
cmp r1, #REG_FPSCR
bne _exit_dbg_outputOneRegValue /* No match, skip */
+#endif
-_output_dummy_fpscr:
- /* Output Dummy FPSCR value */
+_output_dummy_regval:
+ /* Output Dummy Register value (for FP0-FP7, FPSR) */
mov r1, #0
b _output2buffer /* Output all zeros for FPSCR */
@@ -873,10 +877,12 @@ _dbg__cmd_GetAllRegs:
add r3, r3, #1 /* increment index */
cmp r3, #REG_PC
bls 1b /* process all the registers */
+#if 0
_get_cpsr:
+ /* GDB will query for CPSR value specifically */
mov r1, #REG_CPSR /* Output User CPSR Value last */
bl _dbg_outputOneRegValue /* update output buffer */
-
+#endif
_asciiz r0, r1
bl dbg__putDebugMsg /* Send response to the GDB server */
ldmfd sp!, {pc}