summaryrefslogtreecommitdiffstats
path: root/c/src/librdbg/src/i386/rdbg_f.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/src/librdbg/src/i386/rdbg_f.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/c/src/librdbg/src/i386/rdbg_f.c b/c/src/librdbg/src/i386/rdbg_f.c
index aeb07fcbe8..b339256e70 100644
--- a/c/src/librdbg/src/i386/rdbg_f.c
+++ b/c/src/librdbg/src/i386/rdbg_f.c
@@ -5,6 +5,8 @@
*
* Synopsis = rdbg/i386/rdbg_f.c
*
+ * $Id$
+ *
**************************************************************************
*/
@@ -128,3 +130,26 @@ CancelSingleStep (CPU_Exception_frame* ctx)
ctx->eflags &= ~EFLAGS_TF;
ExitForSingleStep-- ;
}
+
+cpuExcHandlerType old_currentExcHandler;
+extern void rtems_exception_prologue_50();
+
+void connect_rdbg_exception()
+{
+ interrupt_gate_descriptor *currentIdtEntry;
+ unsigned limit;
+ unsigned level;
+
+ /*
+ * Connect the Exception used to debug
+ */
+ i386_get_info_from_IDTR (&currentIdtEntry, &limit);
+
+ _CPU_ISR_Disable(level);
+ create_interrupt_gate_descriptor (&currentIdtEntry[50], rtems_exception_prologue_50);
+ _CPU_ISR_Enable(level);
+
+ old_currentExcHandler = _currentExcHandler;
+ _currentExcHandler = BreakPointExcHdl ;
+
+}