aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/armdebug/Debugger/debug_stub.h
diff options
context:
space:
mode:
authorTC Wan2011-03-23 16:27:58 +0800
committerTC Wan2011-03-23 16:27:58 +0800
commit2f91494901e933524a0c6c117c0fa4c984835589 (patch)
treed4e7d352aadf6b9758d7f7b319a772b7bf300298 /AT91SAM7S256/armdebug/Debugger/debug_stub.h
parent0f08888a613ec00fb681e6da71152f99c27476f8 (diff)
parent9eaeb4f0b79cfb0015afba33a1f044530fcb7652 (diff)
Merge branch 'master' of ssh://svc.cs.usm.my/~/gitrepo-bare/armdebug
Diffstat (limited to 'AT91SAM7S256/armdebug/Debugger/debug_stub.h')
-rw-r--r--AT91SAM7S256/armdebug/Debugger/debug_stub.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/AT91SAM7S256/armdebug/Debugger/debug_stub.h b/AT91SAM7S256/armdebug/Debugger/debug_stub.h
index e39fc8e..7dc9aa8 100644
--- a/AT91SAM7S256/armdebug/Debugger/debug_stub.h
+++ b/AT91SAM7S256/armdebug/Debugger/debug_stub.h
@@ -87,6 +87,13 @@
#define CMD_REG_REGPARAMLEN 8 /* 32-bit ASCII Hex Value */
#define CMD_REG_SETONE_PARAMLEN (2 + CMD_REG_REGPARAMLEN)
#define CMD_REG_SETALL_PARAMLEN (CMD_REG_NUMREGS*CMD_REG_REGPARAMLEN)
+/*@}*/
+
+/** @name Debug Memory Command Constants.
+ *
+ * Debug Memory Command
+ */
+/*@{*/
#define CMD_NUMITEMS_PARAMLEN 4 /* 16-bit ASCII Hex Value */
#define CMD_MEM_READ_PARAMLEN (CMD_REG_REGPARAMLEN + CMD_NUMITEMS_PARAMLEN + 1) /* Address length is equivalent to reg param len */
#define CMD_MEM_WRITE_MINPARAMLEN (CMD_REG_REGPARAMLEN + CMD_NUMITEMS_PARAMLEN + 2) /* Address length is equivalent to reg param len */
@@ -97,6 +104,17 @@
#define CMD_MEM_MAXWRITEBYTES ((CMD_MEM_MAXINBUFLEN - CMD_MEM_WRITE_MINPARAMLEN)/2)
/*@}*/
+/** @name Debug Continue Command Constants.
+ *
+ * Debug Continue Command
+ */
+/*@{*/
+#define CMD_REG_CONTINUE_PARAMLEN 0
+#define CMD_REG_CONTINUEFROM_PARAMLEN CMD_REG_REGPARAMLEN /* Address length is equivalent to reg param len */
+/*@}*/
+
+
+
/** @name Debug Breakpoint Command Constants.
*
* Debug Breakpoint Command
@@ -126,9 +144,12 @@
* Debug Stack Manipulation Values
*/
/*@{*/
-#define DBGSTACK_USERCPSR_OFFSET (DBGSTACK_USERCPSR_INDEX-DBGSTACK_USERREG_INDEX) /* = -1, offset for calculating Debug Stack index */
+#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 */
/*@}*/
/** @name Bitmask Definitions.
@@ -208,6 +229,7 @@
ENUM_BEGIN
ENUM_VALASSIGN(DBG_RESET, 0) /**< Initial State. */
ENUM_VAL(DBG_INIT) /**< Debugger Initialized. */
+ENUM_VAL(DBG_CONFIGURED) /**< Debugger has been configured by GDB Server */
ENUM_VAL(DBG_MANUAL_BKPT_ARM) /**< Manual ARM Breakpoint. */
ENUM_VAL(DBG_NORMAL_BKPT_ARM) /**< Normal ARM Breakpoint (Single Step, Normal). */
ENUM_VAL(DBG_MANUAL_BKPT_THUMB) /**< Manual Thumb Breakpoint. */