aboutsummaryrefslogtreecommitdiff
path: root/Debugger/debug_stub.h
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-01-18 15:51:30 +0800
committerTat-Chee Wan (USM)2011-01-18 15:51:30 +0800
commitf9ebd55c1fb05abdc57ae119fe1fd876b5005ac2 (patch)
tree16231f653460782e11582658530a79595204c6ed /Debugger/debug_stub.h
parentc581a52793e2c7abb21a6d2cf3c35d717f60e0d2 (diff)
implemented get/set registers and insert/remove breakpoints commands
Diffstat (limited to 'Debugger/debug_stub.h')
-rw-r--r--Debugger/debug_stub.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/Debugger/debug_stub.h b/Debugger/debug_stub.h
index e7a9ce4..41044b2 100644
--- a/Debugger/debug_stub.h
+++ b/Debugger/debug_stub.h
@@ -60,9 +60,57 @@
#define MSGBUF_CPSRREG '!'
#define MSGBUF_SETCHAR '='
#define MSGBUF_CHKSUMCHAR '#'
+#define MSGBUF_SEPCHAR ','
#define MSGBUF_MSGERROR -1
+/*@}*/
+
+/** @name Debug Command Lookup Constants.
+ *
+ * Debug Command Lookup
+ */
+/*@{*/
+
+#define CMDINDEX_OUTOFRANGE -1
+/*@}*/
+
+/** @name Debug Register Command Constants.
+ *
+ * Debug Register Command
+ */
+/*@{*/
+#define CMD_REG_NUMREGS 17
+#define CMD_REG_GETONE_PARAMLEN 1
+#define CMD_REG_GETALL_PARAMLEN 0
+#define CMD_REG_SETONE_PARAMLEN 6
+#define CMD_REG_SETALL_PARAMLEN (CMD_REG_NUMREGS*4)
+
/*@}*/
+
+/** @name Debug Breakpoint Command Constants.
+ *
+ * Debug Breakpoint Command
+ */
+/*@{*/
+
+#define CMD_BKPT_INSERT_PARAMLEN 12
+#define CMD_BKPT_REMOVE_PARAMLEN 12
+
+
+#define CMD_BKPT_TYPE_BREAK_MEMORY 0
+#define CMD_BKPT_TYPE_BREAK_HARD 1 /* Not supported */
+#define CMD_BKPT_TYPE_WATCH_WRITE 2 /* Not supported (yet) */
+#define CMD_BKPT_TYPE_WATCH_READ 3 /* Not supported (yet) */
+#define CMD_BKPT_TYPE_WATCH_ACCESS 4 /* Not supported (yet) */
+
+#define CMD_BKPT_KIND_THUMB 2
+#define CMD_BKPT_KIND_THUMB2 3 /* Not supported */
+#define CMD_BKPT_KIND_ARM 4
+
+#define CMD_BKPT_NOTFOUND -1
+
+/*@}*/
+
/** @name Debug Stack Constants.
*
* Debug Stack Manipulation Values
@@ -158,6 +206,7 @@ ENUM_VAL(MSG_ERRCHKSUM) /**< Checksum Error. */
ENUM_VAL(MSG_ERRFORMAT) /**< Message Format Error. */
ENUM_VAL(MSG_UNKNOWNCMD) /**< Unrecognized Command Error. */
ENUM_VAL(MSG_UNKNOWNPARAM) /**< Unrecognized Parameter Error. */
+ENUM_VAL(MSG_UNKNOWNBRKPT) /**< Unrecognized Breakpoint Error. */
ENUM_END(dbg_msg_errno)