typedef struct _KTRAP_FRAME { unsigned __int64 P1Home; unsigned __int64 P2Home; unsigned __int64 P3Home; unsigned __int64 P4Home; unsigned __int64 P5; char PreviousMode; unsigned char PreviousIrql; unsigned char FaultIndicator; unsigned char ExceptionActive; unsigned long MxCsr; unsigned __int64 Rax; unsigned __int64 Rcx; unsigned __int64 Rdx; unsigned __int64 R8; unsigned __int64 R9; unsigned __int64 R10; unsigned __int64 R11; union { unsigned __int64 GsBase; unsigned __int64 GsSwap; }; M128A Xmm0; M128A Xmm1; M128A Xmm2; M128A Xmm3; M128A Xmm4; M128A Xmm5; union { unsigned __int64 FaultAddress; unsigned __int64 ContextRecord; unsigned __int64 TimeStampCKCL; }; unsigned __int64 Dr0; unsigned __int64 Dr1; unsigned __int64 Dr2; unsigned __int64 Dr3; unsigned __int64 Dr6; unsigned __int64 Dr7; union { struct { unsigned __int64 DebugControl; unsigned __int64 LastBranchToRip; unsigned __int64 LastBranchFromRip; unsigned __int64 LastExceptionToRip; unsigned __int64 LastExceptionFromRip; }; struct { unsigned __int64 LastBranchControl; unsigned long LastBranchMSR; }; }; unsigned short SegDs; unsigned short SegEs; unsigned short SegFs; unsigned short SegGs; unsigned __int64 TrapFrame; unsigned __int64 Rbx; unsigned __int64 Rdi; unsigned __int64 Rsi; unsigned __int64 Rbp; union { unsigned __int64 ErrorCode; unsigned __int64 ExceptionFrame; unsigned __int64 TimeStampKlog; }; unsigned __int64 Rip; unsigned short SegCs; unsigned char Fill0; unsigned char Logging; unsigned short Fill1[2]; unsigned long EFlags; unsigned long Fill2; unsigned __int64 Rsp; unsigned short SegSs; unsigned short Fill3; long CodePatchCycle; } KTRAP_FRAME, *PKTRAP_FRAME;