summaryrefslogtreecommitdiff
path: root/Debugger/debug_stub.S
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-07-11 09:38:34 +0800
committerTat-Chee Wan (USM)2011-07-11 09:38:34 +0800
commite1309e3eb381cc375f661c21ec9d668f4b746d59 (patch)
tree651a52fc18120ef60180a437a9d2534a3a0a5895 /Debugger/debug_stub.S
parent1da4bbcbb476f5133e9d2c7f8ede8382d9e2bfe2 (diff)
update signal output to handle prefetch and data aborts
Implement Prefetch and Data Abort Signal enum output
Diffstat (limited to 'Debugger/debug_stub.S')
-rw-r--r--Debugger/debug_stub.S20
1 files changed, 17 insertions, 3 deletions
diff --git a/Debugger/debug_stub.S b/Debugger/debug_stub.S
index 193705e..e462c6b 100644
--- a/Debugger/debug_stub.S
+++ b/Debugger/debug_stub.S
@@ -546,7 +546,7 @@ _proc_command:
_dbg_check_gdb_command:
teq r0, #MSGBUF_STARTCHAR
- movne r0, #MSG_ERRFORMAT /* Message Format invalid (not '$') */
+ movne r1, #MSG_ERRFORMAT /* Message Format invalid (not '$') */
bne _dbg__cmdError /* Shouldn't happen */
ldrb r0, [r4], #1 /* Look for command char */
bl _dbg__cmdChar2Index /* Index in R0 */
@@ -558,7 +558,7 @@ _dbg_unknown_command:
b dbg__bkpt_waitCMD_cont
#if 0
- moveq r0, #MSG_UNKNOWNCMD /* Out of range, Command character not recognized */
+ moveq r1, #MSG_UNKNOWNCMD /* Out of range, Command character not recognized */
beq _dbg__cmdError /* Send response to GDB server */
#endif
@@ -740,8 +740,22 @@ __dbg__sendDebugMsgExit:
* r0, r1, r2, r3: destroyed
*/
_dbg__cmd_Status:
+ /* FIXME: The Signal numbers do not correspond to any GDB defined signals */
stmfd sp!, {lr}
- _dbg_outputMsgStatusSig 0x0 /* FIXME: Dummy Signal number */
+ _dbg_get_bkpt_type r0
+_check_data_abort_exception:
+ teq r0, #DBG_ABORT_DATA
+ moveq r1, #MSG_SIG_DATA
+ beq _exit_dmg__cmd_Status
+_check_prefetch_abort_exception:
+ teq r0, #DBG_ABORT_PREFETCH
+ moveq r1, #MSG_SIG_PREFETCH
+ beq _exit_dmg__cmd_Status
+_default_breakpoint_exception:
+ mov r1, #MSG_SIG_DEFAULT /* FIXME: Dummy Signal number */
+
+_exit_dmg__cmd_Status:
+ _dbg_outputMsgStatusSig
b __dbg__sendDebugMsgExit
/* _dbg__cmd_Query