144 return TrapFrame->HardwareEsp;
152 return TrapFrame->TempEsp;
157 return (
ULONG)&TrapFrame->HardwareEsp;
182 TrapFrame->HardwareEsp = Esp;
187 if (Esp < Previous)
KeBugCheckEx(SET_OF_INVALID_CONTEXT,
197 TrapFrame->TempEsp = Esp;
205 TrapFrame->TempSegCs = TrapFrame->SegCs;
206 TrapFrame->SegCs &= ~FRAME_EDITED;
209 TrapFrame->TempEsp = Esp;
226 return TrapFrame->HardwareSegSs;
231 return TrapFrame->HardwareSegSs |
RPL_MASK;
252 TrapFrame->HardwareSegSs = Ss;
257 TrapFrame->HardwareSegSs = Ss |
RPL_MASK;
265 INT FxTagWord = ~TagWord;
271 FxTagWord = (FxTagWord | (FxTagWord >> 1)) & 0x5555;
272 FxTagWord = (FxTagWord | (FxTagWord >> 1)) & 0x3333;
273 FxTagWord = (FxTagWord | (FxTagWord >> 2)) & 0x0f0f;
274 FxTagWord = (FxTagWord | (FxTagWord >> 4)) & 0x00ff;
352 TrapFrame->SegCs =
Context->SegCs;
396 TrapFrame->V86Ds =
Context->SegDs;
397 TrapFrame->V86Es =
Context->SegEs;
398 TrapFrame->V86Fs =
Context->SegFs;
399 TrapFrame->V86Gs =
Context->SegGs;
407 TrapFrame->SegGs = 0;
412 TrapFrame->SegDs =
Context->SegDs;
413 TrapFrame->SegEs =
Context->SegEs;
414 TrapFrame->SegFs =
Context->SegFs;
420 TrapFrame->SegGs = 0;
425 TrapFrame->SegGs =
Context->SegGs;
442 &
Context->ExtendedRegisters[0],
488 for (
i = 0;
i < 8;
i++)
492 Context->FloatSave.RegisterArea + (
i * 10),
549 if (TrapFrame->Dr0) DrMask |=
DR_MASK(0);
550 if (TrapFrame->Dr1) DrMask |=
DR_MASK(1);
551 if (TrapFrame->Dr2) DrMask |=
DR_MASK(2);
552 if (TrapFrame->Dr3) DrMask |=
DR_MASK(3);
553 if (TrapFrame->Dr6) DrMask |=
DR_MASK(6);
600 Context->EFlags = TrapFrame->EFlags;
607 Context->SegCs = TrapFrame->TempSegCs & 0xFFFF;
612 Context->SegCs = TrapFrame->SegCs & 0xFFFF;
627 Context->SegGs = TrapFrame->V86Gs & 0xFFFF;
628 Context->SegFs = TrapFrame->V86Fs & 0xFFFF;
629 Context->SegEs = TrapFrame->V86Es & 0xFFFF;
630 Context->SegDs = TrapFrame->V86Ds & 0xFFFF;
638 TrapFrame->SegGs = 0;
645 Context->SegGs = TrapFrame->SegGs & 0xFFFF;
646 Context->SegFs = TrapFrame->SegFs & 0xFFFF;
647 Context->SegEs = TrapFrame->SegEs & 0xFFFF;
648 Context->SegDs = TrapFrame->SegDs & 0xFFFF;
763 if (!TrapInformation)
return FALSE;
766 switch (TrapFrame->
SegCs)
828 switch (ExceptionRecord->ExceptionCode)
857 if (FirstChance !=
FALSE)
889 ExceptionRecord->ExceptionCode,
890 (
ULONG_PTR)ExceptionRecord->ExceptionAddress,
955 ExceptionRecord->NumberParameters) *
956 sizeof(
ULONG) + 3) & ~3;
978 TrapFrame->SegGs = 0;
994 ExceptionRecord->ExceptionAddress;
996 (
PVOID)&LocalExceptRecord,
1005 DPRINT(
"First chance exception in %.16s, ExceptionCode: %lx, ExceptionAddress: %p, P0: %lx, P1: %lx\n",
1007 ExceptionRecord->ExceptionCode,
1008 ExceptionRecord->ExceptionAddress,
1009 ExceptionRecord->ExceptionInformation[0],
1010 ExceptionRecord->ExceptionInformation[1]);
1026 DPRINT1(
"Kill %.16s, ExceptionCode: %lx, ExceptionAddress: %p, BaseAddress: %p, P0: %lx, P1: %lx\n",
1028 ExceptionRecord->ExceptionCode,
1029 ExceptionRecord->ExceptionAddress,
1031 ExceptionRecord->ExceptionInformation[0],
1032 ExceptionRecord->ExceptionInformation[1]);
1036 ExceptionRecord->ExceptionCode,
1037 (
ULONG_PTR)ExceptionRecord->ExceptionAddress,
1134 OldEip = TrapFrame->
Eip;
VOID NTAPI KeTrapFrameToContext(IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame, IN OUT PCONTEXT Context)
VOID NTAPI KiDispatchException(IN PEXCEPTION_RECORD ExceptionRecord, IN PKEXCEPTION_FRAME ExceptionFrame, IN PKTRAP_FRAME TrapFrame, IN KPROCESSOR_MODE PreviousMode, IN BOOLEAN FirstChance)
NTSTATUS NTAPI KeRaiseUserException(_In_ NTSTATUS ExceptionCode)
VOID NTAPI KeContextToTrapFrame(IN PCONTEXT Context, IN OUT PKEXCEPTION_FRAME ExceptionFrame, IN OUT PKTRAP_FRAME TrapFrame, IN ULONG ContextFlags, IN KPROCESSOR_MODE PreviousMode)
_Inout_ PIRP _In_ NTSTATUS ExceptionCode
BOOLEAN NTAPI DbgkForwardException(IN PEXCEPTION_RECORD ExceptionRecord, IN BOOLEAN DebugPort, IN BOOLEAN SecondChance)
#define EXCEPTION_MAXIMUM_PARAMETERS
struct _EXCEPTION_RECORD EXCEPTION_RECORD
#define KeRaiseIrql(irql, oldIrql)
#define KeLowerIrql(oldIrql)
#define KeGetCurrentIrql()
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define KeGetCurrentThread
VOID NTAPI KiEspToTrapFrame(IN PKTRAP_FRAME TrapFrame, IN ULONG Esp)
ULONG NTAPI KiEspFromTrapFrame(IN PKTRAP_FRAME TrapFrame)
DECLSPEC_NORETURN VOID NTAPI KiDispatchExceptionFromTrapFrame(IN NTSTATUS Code, IN ULONG Flags, IN ULONG_PTR Address, IN ULONG ParameterCount, IN ULONG_PTR Parameter1, IN ULONG_PTR Parameter2, IN ULONG_PTR Parameter3, IN PKTRAP_FRAME TrapFrame)
BOOLEAN FASTCALL KeInvalidAccessAllowed(IN PVOID TrapInformation OPTIONAL)
ULONG FASTCALL KiUpdateDr7(IN ULONG Dr7)
USHORT NTAPI KiTagWordFnsaveToFxsave(USHORT TagWord)
VOID NTAPI KeInitExceptions(VOID)
VOID NTAPI KiSsToTrapFrame(IN PKTRAP_FRAME TrapFrame, IN ULONG Ss)
VOID NTAPI Ki386AdjustEsp0(IN PKTRAP_FRAME TrapFrame)
BOOLEAN FASTCALL KiRecordDr7(OUT PULONG Dr7Ptr, OUT PULONG DrMask)
DECLSPEC_NORETURN VOID FASTCALL KiSystemFatalException(IN ULONG ExceptionCode, IN PKTRAP_FRAME TrapFrame)
ULONG NTAPI KiSsFromTrapFrame(IN PKTRAP_FRAME TrapFrame)
#define EXCEPTION_EXECUTE_HANDLER
void __cdecl _disable(void)
__INTRIN_INLINE void __writeeflags(uintptr_t Value)
__INTRIN_INLINE uintptr_t __readeflags(void)
DBGKD_GET_VERSION64 KdVersionBlock
BOOLEAN KdIgnoreUmExceptions
PKDEBUG_ROUTINE KiDebugRoutine
BOOLEAN NTAPI KdIsThisAKdTrap(IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT Context, IN KPROCESSOR_MODE PreviousMode)
#define MAXIMUM_IDTVECTOR
struct _KTRAP_FRAME KTRAP_FRAME
FORCEINLINE struct _KPRCB * KeGetCurrentPrcb(VOID)
#define DR7_RESERVED_MASK
#define DR7_OVERRIDE_MASK
struct _FX_SAVE_AREA * PFX_SAVE_AREA
struct _FX_SAVE_AREA FX_SAVE_AREA
#define SIZE_OF_FX_REGISTERS
#define KI_EXCEPTION_ACCESS_VIOLATION
NTSYSAPI BOOLEAN NTAPI RtlDispatchException(_In_ PEXCEPTION_RECORD ExceptionRecord, _In_ PCONTEXT Context)
NTSYSAPI VOID NTAPI RtlRaiseException(_In_ PEXCEPTION_RECORD ExceptionRecord)
#define CONTEXT_DEBUG_REGISTERS
#define NtCurrentProcess()
#define CONTEXT_FLOATING_POINT
#define SIZE_OF_80387_REGISTERS
#define DECLSPEC_NORETURN
FORCEINLINE BOOLEAN KiUserTrap(IN PKTRAP_FRAME TrapFrame)
FORCEINLINE ULONG Ke386SanitizeFlags(IN ULONG Eflags, IN KPROCESSOR_MODE Mode)
VOID NTAPI KiFlushNPXState(IN FLOATING_SAVE_AREA *SaveArea)
DECLSPEC_NORETURN VOID FASTCALL KiEoiHelper(IN PKTRAP_FRAME TrapFrame)
KIDTENTRY KiIdt[MAXIMUM_IDTVECTOR+1]
FORCEINLINE ULONG Ke386SanitizeSeg(IN ULONG Cs, IN KPROCESSOR_MODE Mode)
VOID NTAPI ExpInterlockedPopEntrySListFault(VOID)
DECLSPEC_NORETURN VOID NTAPI KeBugCheckWithTf(ULONG BugCheckCode, ULONG_PTR BugCheckParameter1, ULONG_PTR BugCheckParameter2, ULONG_PTR BugCheckParameter3, ULONG_PTR BugCheckParameter4, PKTRAP_FRAME Tf)
PVOID KeRaiseUserExceptionDispatcher
PVOID KeUserExceptionDispatcher
#define STATUS_STACK_OVERFLOW
#define STATUS_BREAKPOINT
#define STATUS_ACCESS_VIOLATION
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_GetExceptionInformation()
#define _SEH2_YIELD(__stmt)
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
PVOID MmHighestUserAddress
#define CONTEXT_EXTENDED_REGISTERS
PULONG MinorVersion OPTIONAL
struct _EXCEPTION_RECORD * ExceptionRecord
ULONG_PTR ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]
UCHAR RegisterArea[SIZE_OF_80387_REGISTERS]
union _FX_SAVE_AREA::@2458 U
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_In_ UCHAR _In_ UCHAR _In_ ULONG Code
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
_Must_inspect_result_ _In_ ULONG Flags
#define MAXIMUM_SUPPORTED_EXTENSION
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
#define PsGetCurrentProcess
_In_ KPROCESSOR_MODE PreviousMode