[HEADERS]
[reactos.git] / reactos / ntoskrnl / ke / except.c
index c8533d0..525fc83 100644 (file)
@@ -180,10 +180,12 @@ NtRaiseException(IN PEXCEPTION_RECORD ExceptionRecord,
     /* Get trap frame and link previous one*/
     Thread = KeGetCurrentThread();
     TrapFrame = Thread->TrapFrame;
-    Thread->TrapFrame = (PKTRAP_FRAME)TrapFrame->Edx;
+    Thread->TrapFrame = KiGetLinkedTrapFrame(TrapFrame);
     
     /* Set exception list */
-    KeGetPcr()->Tib.ExceptionList = TrapFrame->ExceptionList;
+#ifdef _M_IX86
+    KeGetPcr()->NtTib.ExceptionList = TrapFrame->ExceptionList;
+#endif
     
     /* Raise the exception */
     Status = KiRaiseException(ExceptionRecord,
@@ -218,7 +220,7 @@ NtContinue(IN PCONTEXT Context,
     /* Get trap frame and link previous one*/
     Thread = KeGetCurrentThread();
     TrapFrame = Thread->TrapFrame;
-    Thread->TrapFrame = (PKTRAP_FRAME)TrapFrame->Edx;
+    Thread->TrapFrame = KiGetLinkedTrapFrame(TrapFrame);
     
     /* Continue from this point on */
     Status = KiContinue(Context, NULL, TrapFrame);