summaryrefslogtreecommitdiff
path: root/Debugger/debug_macros.h
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-03-22 16:50:25 +0800
committerTat-Chee Wan (USM)2011-03-22 16:50:25 +0800
commitb66fd09e34c9a720acd5367eb7658456417a8c3b (patch)
tree87452748c1cda577746586560e34eb9d3b31f6ed /Debugger/debug_macros.h
parent727dba872b5a17c070ebc5c44d927ad6743acc19 (diff)
continue command wip
Work in Progress, for implementing continue command
Diffstat (limited to 'Debugger/debug_macros.h')
-rw-r--r--Debugger/debug_macros.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/Debugger/debug_macros.h b/Debugger/debug_macros.h
index 3fcc78c..d6786d5 100644
--- a/Debugger/debug_macros.h
+++ b/Debugger/debug_macros.h
@@ -223,6 +223,20 @@
_asciiz r0, r1
.endm
+/* _regenum2index
+ * Convert register enum to debugger stack index
+ *
+ * On entry:
+ * indexenum: enum representing Register to access
+ * indexreg: register to be used to store the debugger stack index value (0-max index)
+ * On exit:
+ * indexreg contains debugger stack index value (0-max index)
+ */
+ .macro _regenum2index indexenum, indexreg
+ mov \indexreg, #indexenum
+ add \indexreg, \indexreg, #DBGSTACK_USERREG_INDEX /* Convert register index to Debug Stack index, keep in R1 */
+ .endm
+
/* _getdbgregisterfromindex
* Retrieve register contents from debugger stack given index
*