summaryrefslogtreecommitdiff
path: root/Debugger/debug_macros.h
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-03-22 07:29:01 +0800
committerTat-Chee Wan (USM)2011-03-22 07:29:01 +0800
commitd989c3e9adcc8c016bbefcc69b0d7ebfbdd2ff18 (patch)
tree26748cb4c8c3fed7d99195a7f5d7ed7134299e39 /Debugger/debug_macros.h
parent62c15f55e6fc9770e5dab43a1e1a6d8e4085863e (diff)
cleaned up error message handlers
Diffstat (limited to 'Debugger/debug_macros.h')
-rw-r--r--Debugger/debug_macros.h29
1 files changed, 20 insertions, 9 deletions
diff --git a/Debugger/debug_macros.h b/Debugger/debug_macros.h
index 5af75fd..b7f4ea1 100644
--- a/Debugger/debug_macros.h
+++ b/Debugger/debug_macros.h
@@ -148,18 +148,18 @@
_dbg_stpcpy r0, r1, r2
.endm
-/* _dbg_outputMsgStatusErr
+/* __dbg_outputErrMsg
+ * Internal Routine called to generate error messages
* Return Message with Error ('-$ENN') status
* On entry:
- * R0: error code
+ * R1: error code
* On exit:
* R0: Pointer to Output Buffer ASCIIZ location
* R1: destroyed
* R2: destroyed
* R3: destroyed
*/
- .macro _dbg_outputMsgStatusErr
- mov r1, r0
+ .macro __dbg_outputErrMsg
ldr r0, =debug_OutMsgBuf
ldr r2, =debug_ErrorResponsePrefix
_dbg_stpcpy r0, r2, r3
@@ -167,6 +167,21 @@
_asciiz r0, r1
.endm
+/* _dbg_outputMsgStatusErr
+ * Return Message with Error ('-$ENN') status
+ * On entry:
+ * R0: error code
+ * On exit:
+ * R0: Pointer to Output Buffer ASCIIZ location
+ * R1: destroyed
+ * R2: destroyed
+ * R3: destroyed
+ */
+ .macro _dbg_outputMsgStatusErr
+ mov r1, r0
+ __dbg_outputErrMsg
+ .endm
+
/* _dbg_outputMsgStatusErrCode
* Return Message with Error ('-$ENN') status
* On exit:
@@ -175,12 +190,8 @@
* R2: destroyed
*/
.macro _dbg_outputMsgStatusErrCode errcode
- ldr r0, =debug_OutMsgBuf
- ldr r1, =debug_ErrorResponsePrefix
- _dbg_stpcpy r0, r1, r2
mov r1, #\errcode
- bl byte2ascii /* R0 points to buffer position after byte value */
- _asciiz r0, r1
+ __dbg_outputErrMsg
.endm
/* _dbg_outputMsgStatusSig