aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/armdebug/Debugger/debug_internals.h
diff options
context:
space:
mode:
Diffstat (limited to 'AT91SAM7S256/armdebug/Debugger/debug_internals.h')
-rw-r--r--AT91SAM7S256/armdebug/Debugger/debug_internals.h100
1 files changed, 95 insertions, 5 deletions
diff --git a/AT91SAM7S256/armdebug/Debugger/debug_internals.h b/AT91SAM7S256/armdebug/Debugger/debug_internals.h
index c7f5d16..e187b82 100644
--- a/AT91SAM7S256/armdebug/Debugger/debug_internals.h
+++ b/AT91SAM7S256/armdebug/Debugger/debug_internals.h
@@ -119,6 +119,19 @@
#define CMD_STEP_MINPARAMLEN 0
/*@}*/
+/** @name Debug Query Command Constants.
+ *
+ * Debug Query Command
+ */
+/*@{*/
+#define CMD_QUERY_MINPARAMLEN 0
+#define CMD_QUERY_CURRTID_PARAMLEN 1
+#define CMD_QUERY_FTINFO_PARAMLEN 11
+#define CMD_QUERY_STINFO_PARAMLEN 11
+#define CMD_QUERY_CURRTID_CHAR 'C'
+#define CMD_QUERY_FTINFO_CHAR 'f'
+#define CMD_QUERY_STINFO_CHAR 's'
+/*@}*/
/** @name Debug Breakpoint Command Constants.
@@ -167,12 +180,12 @@
#define RESET_VECTOR 0x00000000
#define UNDEF_VECTOR 0x00000004
-#define SVC_VECTOR 0x00000008
+#define SVC_VECTOR 0x00000008
#define PABRT_VECTOR 0x0000000C
#define DABRT_VECTOR 0x00000010
#define RESERVED_VECTOR 0x00000014
-#define IRQ_VECTOR 0x00000018
-#define FIQ_VECTOR 0x0000001C
+#define IRQ_VECTOR 0x00000018
+#define FIQ_VECTOR 0x0000001C
/*@}*/
@@ -210,7 +223,7 @@
#define CPSR_FIQ 0x00000040
#define CPSR_IRQ 0x00000080
#define CPSR_MODE 0x0000001F
-#define CPSR_COND 0xF0000000
+#define CPSR_COND 0xF0000000
/* ARM Exception Modes */
#define MODE_USR 0x10 /* User mode */
@@ -230,6 +243,44 @@
#define CPSR_CFLAG 0x20000000
#define CPSR_VFLAG 0x10000000
+
+/*
+ * ARM Opcode Masks (for Parser)
+ */
+#define ARM_DATA_INSTR_MASK 0x0FBF0000
+#define ARM_DATA_INSTR_MSRMRS 0x010F0000
+#define ARM_DATA_INSTR_NORMAL 0x01E00000
+#define ARM_DATA_INSTR_IMMREG 0x02000000
+
+#define ARM_LDR_INSTR_REGIMM 0x02000000
+#define ARM_LDR_INSTR_PREPOST 0x01000000
+#define ARM_LDR_INSTR_UPDOWN 0x00800000
+
+#define ARM_LDM_INSTR_PREPOST 0x01000000
+#define ARM_LDM_INSTR_UPDOWN 0x00800000
+
+#define ARM_BLX_INSTR_MASK 0xFE000000
+#define ARM_BLX_INSTR_BLX 0xFA000000
+#define ARM_BLX_INSTR_HBIT 0x01000000
+
+#define ARM_SWI_INSTR_MASK 0x0F000000
+#define ARM_SWI_INSTR_VAL 0x0F000000
+
+
+/*
+ * Thumb Opcode Masks (for Parser)
+ */
+#define THUMB_BLX_INSTR_REG_RNMASK 0x0078
+
+#define THUMB_BCOND_SWI_INSTR_CONDMASK 0x0F00
+#define THUMB_BCOND_SWI_COND_UNUSED 0x0E00
+#define THUMB_BCOND_SWI_INSTR_SWI 0x0F00
+
+#define THUMB_BLX_INSTR_IMM_HBIT 0x0800
+#define THUMB_BLX_INSTR_IMM_MASK 0xF000
+#define THUMB_BLX_INSTR_IMM_BL 0xF000
+#define THUMB_BLX_INSTR_IMM_BLX 0xE000
+
/*@}*/
/** Debugger State Enums
@@ -249,13 +300,40 @@ ENUM_END(dbg_state_t)
* The enums must be consecutive, starting from 0
*/
ENUM_BEGIN
-ENUM_VALASSIGN(DBG_AUTO_BKPT,0) /**< Auto Breakpoint (Instruction resume after breakpoint). */
+ENUM_VALASSIGN(DBG_AUTO_BKPT,0) /**< RESERVED: Auto Breakpoint (Instruction resume after breakpoint). */
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. */
ENUM_VAL(DBG_NORMAL_BKPT_THUMB) /**< Normal Thumb Breakpoint (Single Step, Normal). */
+ENUM_VAL(DBG_ABORT_PREFETCH) /**< Prefetch Abort. */
+ENUM_VAL(DBG_ABORT_DATA) /**< Data Abort. */
ENUM_END(bkpt_type_t)
+/** Debugger Message Signal Enums
+ *
+ * Debugger Signal Message Enums.
+ * The enums must be consecutive, starting from 0
+ */
+/* Need to sync with the Signal enums in ecos-common-hal_stub.c */
+ENUM_BEGIN
+ENUM_VALASSIGN(MSG_SIG_DEFAULT, 0) /**< Default Signal Response. */
+ENUM_VAL(MSG_SIG_HUP) /**< Hangup Signal Response. */
+ENUM_VAL(MSG_SIG_INT) /**< Interrupt Signal Response. */
+ENUM_VAL(MSG_SIG_QUIT) /**< Quit Signal Response. */
+ENUM_VAL(MSG_SIG_ILL) /**< Illegal Instruction Signal Response (not reset when caught). */
+ENUM_VAL(MSG_SIG_TRAP) /**< Trace Trap Signal Response (not reset when caught). */
+ENUM_VAL(MSG_SIG_ABRT) /**< Abort Signal Response (replace SIGIOT). */
+ENUM_VAL(MSG_SIG_EMT) /**< EMT Instruciton Signal Response. */
+ENUM_VAL(MSG_SIG_FPE) /**< Floating Point Exception Signal Response. */
+ENUM_VAL(MSG_SIG_KILL) /**< Kill Signal Response (cannot be caught or ignored). */
+ENUM_VAL(MSG_SIG_BUS) /**< Bus Error Signal Response. */
+ENUM_VAL(MSG_SIG_SEGV) /**< Segmentation Violation Signal Response. */
+ENUM_VAL(MSG_SIG_SYS) /**< Bad Argument to System Call Signal Response. */
+ENUM_VAL(MSG_SIG_PIPE) /**< Write on a Pipe with No Reader Signal Response. */
+ENUM_VAL(MSG_SIG_ALRM) /**< Alarm Clock Signal Response. */
+ENUM_VAL(MSG_SIG_TERM) /**< Software Termination Signal from Kill Signal Response. */
+ENUM_END(dbg_msg_signo)
+
/** Debugger Message Error Enums
*
* Debugger Error Message Enums.
@@ -299,5 +377,17 @@ ENUM_VAL(REG_CPSR) /**< Previous Mode CPSR */
ENUM_END(register_enum_t)
+/** Abort Type Enums
+ *
+ * Abort Type used for interfacing with LCD Display routine.
+ * The enums must be consecutive, starting from 0
+ * Note: The values must align with those defined in NxOS's _abort.h
+ */
+ENUM_BEGIN
+ENUM_VALASSIGN(DISP_ABORT_PREFETCH,0) /**< Prefetch Abort. */
+ENUM_VAL(DISP_ABORT_DATA) /**< Data Abort. */
+ENUM_VAL(DISP_ABORT_SPURIOUS) /**< Spurious IRQ. */
+ENUM_VAL(DISP_ABORT_ILLEGAL) /**< Illegal Instruction. */
+ENUM_END(abort_type_t)
#endif /* __DEBUG_INTERNALS_H__ */