summaryrefslogtreecommitdiffstats
path: root/c/src/librdbg/include/rdbg/i386
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/librdbg/include/rdbg/i386')
-rw-r--r--c/src/librdbg/include/rdbg/i386/rdbg_f.h53
-rw-r--r--c/src/librdbg/include/rdbg/i386/reg.h32
2 files changed, 85 insertions, 0 deletions
diff --git a/c/src/librdbg/include/rdbg/i386/rdbg_f.h b/c/src/librdbg/include/rdbg/i386/rdbg_f.h
new file mode 100644
index 0000000000..3fd087f50a
--- /dev/null
+++ b/c/src/librdbg/include/rdbg/i386/rdbg_f.h
@@ -0,0 +1,53 @@
+/*
+ **************************************************************************
+ *
+ * Component = RDBG
+ * Module = rdbg_f.h
+ *
+ * Synopsis = Machine-dependent header file
+ *
+ **************************************************************************
+ */
+
+#ifndef RDBG_F_H
+#define RDBG_F_H
+
+#include <rtems.h>
+#include <rdbg/remdeb.h>
+
+#define EFLAGS_TF 0x00100
+
+typedef struct Exception_context_struct {
+ struct Exception_context_struct *next;
+ struct Exception_context_struct *previous;
+ Objects_Id id;
+ Objects_Id semaphoreId;
+ CPU_Exception_frame *ctx;
+} Exception_context;
+
+extern int PushExceptCtx (Objects_Id Id,
+ Objects_Id semId,
+ CPU_Exception_frame *ctx);
+extern int PopExceptCtx (Objects_Id Id);
+extern Exception_context *GetExceptCtx (Objects_Id Id);
+extern int Single_Step (CPU_Exception_frame* ctx);
+extern int CheckForSingleStep (CPU_Exception_frame* ctx);
+extern void BreakPointExcHdl (CPU_Exception_frame *ctx);
+extern void CtxToRegs (const CPU_Exception_frame*,xdr_regs*);
+extern void RegsToCtx (const xdr_regs*,CPU_Exception_frame*);
+
+extern void enterRdbg ();
+extern void get_ctx_thread (Thread_Control *thread,
+ CPU_Exception_frame* ctx);
+extern void set_ctx_thread (Thread_Control *thread,
+ CPU_Exception_frame* ctx);
+
+void copyback_data_cache_and_invalidate_instr_cache();
+
+extern int ExitForSingleStep;
+
+
+#endif
+
+
+
diff --git a/c/src/librdbg/include/rdbg/i386/reg.h b/c/src/librdbg/include/rdbg/i386/reg.h
new file mode 100644
index 0000000000..d6b34f3c28
--- /dev/null
+++ b/c/src/librdbg/include/rdbg/i386/reg.h
@@ -0,0 +1,32 @@
+
+
+#define NBREGS 19
+
+#define SS 18
+#define UESP 17
+#define EFL 16
+#define CS 15
+#define EIP 14
+#define ERR 13
+#define TRAPNO 12
+#define EAX 11
+#define ECX 10
+#define EDX 9
+#define EBX 8
+#define ESP 7
+#define EBP 6
+#define ESI 5
+#define EDI 4
+#define DS 3
+#define ES 2
+#define FS 1
+#define GS 0
+
+typedef unsigned int regs[NBREGS];
+
+/* To be used in common code */
+typedef regs REGS;
+
+
+
+