15#undef MmSystemRangeStart
22#if defined(_M_IX86) || defined(_M_AMD64)
28#define KPCR_SELF_PCR_OFFSET FIELD_OFFSET(KPCR, SelfPcr)
29#define KPCR_CURRENT_PRCB_OFFSET FIELD_OFFSET(KPCR, Prcb)
30#define KPCR_CONTAINED_PRCB_OFFSET FIELD_OFFSET(KPCR, PrcbData)
31#define KPCR_INITIAL_STACK_OFFSET 0
32#define KPCR_STACK_LIMIT_OFFSET 0
33#define KPRCB_PCR_PAGE_OFFSET 0
34#define CBSTACK_FRAME_POINTER Ebp
36#elif defined(_M_AMD64)
38#define KPCR_SELF_PCR_OFFSET FIELD_OFFSET(KPCR, Self)
39#define KPCR_CURRENT_PRCB_OFFSET FIELD_OFFSET(KPCR, CurrentPrcb)
40#define KPCR_CONTAINED_PRCB_OFFSET FIELD_OFFSET(KPCR, Prcb)
41#define KPCR_INITIAL_STACK_OFFSET 0
42#define KPCR_STACK_LIMIT_OFFSET 0
43#define KPRCB_PCR_PAGE_OFFSET 0
44#define CBSTACK_FRAME_POINTER Rbp
48#define KPCR_SELF_PCR_OFFSET 0
49#define KPCR_CURRENT_PRCB_OFFSET FIELD_OFFSET(KIPCR, Prcb)
50#define KPCR_CONTAINED_PRCB_OFFSET 0
51#define KPCR_INITIAL_STACK_OFFSET FIELD_OFFSET(KPCR, InitialStack)
52#define KPCR_STACK_LIMIT_OFFSET FIELD_OFFSET(KPCR, StackLimit)
53#define KPRCB_PCR_PAGE_OFFSET FIELD_OFFSET(KPRCB, PcrPage)
54#define CBSTACK_FRAME_POINTER DummyFramePointer
57#error Unsupported Architecture
501#if defined(_M_AMD64) || defined(_M_ARM64)
506 IMAGE_FILE_MACHINE_NATIVE,
517#if (NTDDI_VERSION >= NTDDI_WS03)
521#if !defined(_WIN64) && (defined(__GNUC__) || defined(__clang__))
523#define PtrToUL64(x) ((ULPTR64)(ULONG_PTR)(x))
525#define PtrToUL64(x) ((ULPTR64)(x))
534#if defined(_M_ARM) || defined(_M_AMD64)
643 KPCR_SELF_PCR_OFFSET,
644 KPCR_CURRENT_PRCB_OFFSET,
645 KPCR_CONTAINED_PRCB_OFFSET,
649 _WARN(
"KPCR_INITIAL_STACK_OFFSET, KPCR_STACK_LIMIT_OFFSET and KPRCB_PCR_PAGE_OFFSET not properly defined on ARM")
654 KPCR_INITIAL_STACK_OFFSET,
655 KPCR_STACK_LIMIT_OFFSET,
656 KPRCB_PCR_PAGE_OFFSET,
673#elif defined(_M_AMD64)
705#if (NTDDI_VERSION >= NTDDI_LONGHORN)
706#error KdDebuggerDataBlock requires other fields for this NT version!
static POBJECT_TYPE ObpTypeObjectType
ULONG_PTR KiBugCheckData[5]
ULONG ExpNumberOfPagedPools
POOL_DESCRIPTOR NonPagedPoolDescriptor
PPOOL_TRACKER_TABLE PoolTrackTable
PPOOL_DESCRIPTOR ExpPagedPoolDescriptor[16+1]
struct _EPROCESS EPROCESS
#define KD_BREAKPOINT_MAX
#define MAX_KD_COMPONENT_TABLE_ENTRIES
#define KD_DEFAULT_LOG_BUFFER_SIZE
BOOLEAN(NTAPI * PKDEBUG_ROUTINE)(IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame, IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT Context, IN KPROCESSOR_MODE PreviousMode, IN BOOLEAN SecondChance)
#define KDP_MSG_BUFFER_SIZE
BOOLEAN NTAPI KdpStub(IN PKTRAP_FRAME TrapFrame, IN PKEXCEPTION_FRAME ExceptionFrame, IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT ContextRecord, IN KPROCESSOR_MODE PreviousMode, IN BOOLEAN SecondChanceException)
ULONG Kd_STORMINIPORT_Mask
BREAKPOINT_ENTRY KdpBreakpointTable[KD_BREAKPOINT_MAX]
BOOLEAN KdPreviouslyEnabled
ULONG TraceDataBufferPosition
ULONG Kd_DRIVEEXTENDER_Mask
ULONG KdPrintRolloverCount
LARGE_INTEGER KdTimerStop
KSPIN_LOCK KdpPrintSpinLock
ULONG KdPrintBufferChanges
LARGE_INTEGER KdPerformanceCounterRate
ULONG_PTR KdpCurrentSymbolEnd
BOOLEAN KdBreakAfterSymbolLoad
BOOLEAN KdEnteredDebugger
VOID NTAPI RtlpBreakWithStatusInstruction(VOID)
ULONG Kd_WSOCKTRANSPORT_Mask
ULONG Kd_CRASHDUMPXHCI_Mask
ULONG Kd_PRINTSPOOLER_Mask
BOOLEAN BreakpointsSuspended
ULONG KdComponentTableSize
DBGKD_GET_VERSION64 KdVersionBlock
PCHAR KdPrintWritePointer
LARGE_INTEGER KdTimerStart
KSPIN_LOCK KdpDebuggerLock
BOOLEAN KdIgnoreUmExceptions
PKDEBUG_ROUTINE KiDebugRoutine
ULONG_PTR KdpCurrentSymbolStart
KSPIN_LOCK KdpTimeSlipEventLock
ULONG TraceDataBuffer[40]
CHAR KdPrintDefaultCircularBuffer[KD_DEFAULT_LOG_BUFFER_SIZE]
ULONG Kd_IHVSTREAMING_Mask
WORK_QUEUE_ITEM KdpTimeSlipWorkItem
KD_BREAKPOINT_TYPE KdpBreakpointInstruction
KDDEBUGGER_DATA64 KdDebuggerDataBlock
ULONG Kd_RTLTHREADPOOL_Mask
ULONG Kd_THREADORDER_Mask
BOOLEAN KdDebuggerNotPresent
BOOLEAN KdpControlCPressed
KSPIN_LOCK KdpDataSpinLock
ULONG KdpNumInternalBreakpoints
CHAR KdpPathBuffer[KDP_MSG_BUFFER_SIZE]
CHAR KdpMessageBuffer[KDP_MSG_BUFFER_SIZE]
PULONG KdComponentTable[MAX_KD_COMPONENT_TABLE_ENTRIES]
LIST_ENTRY KdpDebuggerDataListHead
PCHAR KdPrintCircularBuffer
ULONG Kd_SCSIMINIPORT_Mask
BOOLEAN KdpDebuggerStructuresInitialized
BOOLEAN KdDebuggerEnabled
LARGE_INTEGER KdTimerDifference
ULONG Kd_STORAGECLASSMEMORY_Mask
BOOLEAN KdAutoEnableOnEvent
PLOADER_PARAMETER_BLOCK KeLoaderBlock
PFN_NUMBER MmLowestPhysicalPage
PFN_NUMBER MmHighestPhysicalPage
PMMPTE MmSystemPtesStart[MaximumPtePoolTypes]
PMMPTE MmSystemPtesEnd[MaximumPtePoolTypes]
ULONG_PTR MmSubsectionBase
MM_PAGED_POOL_INFO MmPagedPoolInfo
SIZE_T MmAllocatedNonPagedPool
SIZE_T MmSizeOfPagedPoolInBytes
LIST_ENTRY ExpSystemResourcesList
#define KD_BREAKPOINT_TYPE
#define KD_BREAKPOINT_VALUE
#define MmSystemRangeStart
LIST_ENTRY IopErrorLogListHead
ULONG IopNumTriageDumpDataBlocks
PVOID IopTriageDumpDataBlocks[64]
LIST_ENTRY KeBugcheckCallbackListHead
PKPRCB KiProcessorBlock[]
NTSTATUS NTAPI KiCallUserMode(IN PVOID *OutputBuffer, IN PULONG OutputLength)
PFN_NUMBER MmResidentAvailablePages
PVOID MmTriageActionTaken
SIZE_T MmTotalCommitLimit
LIST_ENTRY MmLoadedUserImageList
PFN_COUNT MmNumberOfPhysicalPages
MMPFNLIST MmStandbyPageListHead
MMPFNLIST MmModifiedPageListHead
MMPFNLIST MmZeroedPageListHead
PVOID MmLastUnloadedDrivers
MM_DRIVER_VERIFIER_DATA MmVerifierData
MMPFNLIST MmModifiedNoWritePageListHead
SIZE_T MmtotalCommitLimitMaximum
_Out_ PKAPC_STATE ApcState
PFN_NUMBER MmAvailablePages
ULONG MmNumberOfPagingFiles
SIZE_T MmTotalCommittedPages
MMPFNLIST MmFreePageListHead
PVOID MmNonPagedSystemStart
ULONG MmMaximumNonPagedPoolInBytes
MMSUPPORT MmSystemCacheWs
PVOID MmNonPagedPoolStart
PPHYSICAL_MEMORY_DESCRIPTOR MmPhysicalMemoryBlock
_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG _In_opt_ LONG volatile * Number
POBJECT_DIRECTORY ObpRootDirectoryObject
LIST_ENTRY PsLoadedModuleList
PHANDLE_TABLE PspCidTable
LIST_ENTRY PsActiveProcessHead
PVOID MmHighestUserAddress
#define CURRENT_KD_SECONDARY_VERSION
#define DBGKD_VERS_FLAG_PTR64
#define DBGKD_VERS_FLAG_DATA
#define FIELD_OFFSET(t, f)
#define DBGKD_64BIT_PROTOCOL_VERSION2