/* 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,
/* 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);