13fa2d384SViktor Prutyanov /* 23fa2d384SViktor Prutyanov * Copyright (c) 2018 Virtuozzo International GmbH 33fa2d384SViktor Prutyanov * 43fa2d384SViktor Prutyanov * This work is licensed under the terms of the GNU GPL, version 2 or later. 53fa2d384SViktor Prutyanov * 63fa2d384SViktor Prutyanov */ 73fa2d384SViktor Prutyanov 83fa2d384SViktor Prutyanov #ifndef KDBG_H 93fa2d384SViktor Prutyanov #define KDBG_H 103fa2d384SViktor Prutyanov 113fa2d384SViktor Prutyanov typedef struct DBGKD_GET_VERSION64 { 123fa2d384SViktor Prutyanov uint16_t MajorVersion; 133fa2d384SViktor Prutyanov uint16_t MinorVersion; 143fa2d384SViktor Prutyanov uint8_t ProtocolVersion; 153fa2d384SViktor Prutyanov uint8_t KdSecondaryVersion; 163fa2d384SViktor Prutyanov uint16_t Flags; 173fa2d384SViktor Prutyanov uint16_t MachineType; 183fa2d384SViktor Prutyanov uint8_t MaxPacketType; 193fa2d384SViktor Prutyanov uint8_t MaxStateChange; 203fa2d384SViktor Prutyanov uint8_t MaxManipulate; 213fa2d384SViktor Prutyanov uint8_t Simulation; 223fa2d384SViktor Prutyanov uint16_t Unused[1]; 233fa2d384SViktor Prutyanov uint64_t KernBase; 243fa2d384SViktor Prutyanov uint64_t PsLoadedModuleList; 253fa2d384SViktor Prutyanov uint64_t DebuggerDataList; 263fa2d384SViktor Prutyanov } DBGKD_GET_VERSION64; 273fa2d384SViktor Prutyanov 28*4591f4ceSViktor Prutyanov #ifndef _WIN32 29*4591f4ceSViktor Prutyanov typedef struct LIST_ENTRY64 { 303fa2d384SViktor Prutyanov struct LIST_ENTRY64 *Flink; 313fa2d384SViktor Prutyanov struct LIST_ENTRY64 *Blink; 32*4591f4ceSViktor Prutyanov } LIST_ENTRY64; 33*4591f4ceSViktor Prutyanov #endif 34*4591f4ceSViktor Prutyanov 35*4591f4ceSViktor Prutyanov typedef struct DBGKD_DEBUG_DATA_HEADER64 { 36*4591f4ceSViktor Prutyanov LIST_ENTRY64 List; 373fa2d384SViktor Prutyanov uint32_t OwnerTag; 383fa2d384SViktor Prutyanov uint32_t Size; 393fa2d384SViktor Prutyanov } DBGKD_DEBUG_DATA_HEADER64; 403fa2d384SViktor Prutyanov 413fa2d384SViktor Prutyanov typedef struct KDDEBUGGER_DATA64 { 423fa2d384SViktor Prutyanov DBGKD_DEBUG_DATA_HEADER64 Header; 433fa2d384SViktor Prutyanov 443fa2d384SViktor Prutyanov uint64_t KernBase; 453fa2d384SViktor Prutyanov uint64_t BreakpointWithStatus; 463fa2d384SViktor Prutyanov uint64_t SavedContext; 473fa2d384SViktor Prutyanov uint16_t ThCallbackStack; 483fa2d384SViktor Prutyanov uint16_t NextCallback; 493fa2d384SViktor Prutyanov uint16_t FramePointer; 503fa2d384SViktor Prutyanov uint16_t PaeEnabled:1; 513fa2d384SViktor Prutyanov uint64_t KiCallUserMode; 523fa2d384SViktor Prutyanov uint64_t KeUserCallbackDispatcher; 533fa2d384SViktor Prutyanov uint64_t PsLoadedModuleList; 543fa2d384SViktor Prutyanov uint64_t PsActiveProcessHead; 553fa2d384SViktor Prutyanov uint64_t PspCidTable; 563fa2d384SViktor Prutyanov uint64_t ExpSystemResourcesList; 573fa2d384SViktor Prutyanov uint64_t ExpPagedPoolDescriptor; 583fa2d384SViktor Prutyanov uint64_t ExpNumberOfPagedPools; 593fa2d384SViktor Prutyanov uint64_t KeTimeIncrement; 603fa2d384SViktor Prutyanov uint64_t KeBugCheckCallbackListHead; 613fa2d384SViktor Prutyanov uint64_t KiBugcheckData; 623fa2d384SViktor Prutyanov uint64_t IopErrorLogListHead; 633fa2d384SViktor Prutyanov uint64_t ObpRootDirectoryObject; 643fa2d384SViktor Prutyanov uint64_t ObpTypeObjectType; 653fa2d384SViktor Prutyanov uint64_t MmSystemCacheStart; 663fa2d384SViktor Prutyanov uint64_t MmSystemCacheEnd; 673fa2d384SViktor Prutyanov uint64_t MmSystemCacheWs; 683fa2d384SViktor Prutyanov uint64_t MmPfnDatabase; 693fa2d384SViktor Prutyanov uint64_t MmSystemPtesStart; 703fa2d384SViktor Prutyanov uint64_t MmSystemPtesEnd; 713fa2d384SViktor Prutyanov uint64_t MmSubsectionBase; 723fa2d384SViktor Prutyanov uint64_t MmNumberOfPagingFiles; 733fa2d384SViktor Prutyanov uint64_t MmLowestPhysicalPage; 743fa2d384SViktor Prutyanov uint64_t MmHighestPhysicalPage; 753fa2d384SViktor Prutyanov uint64_t MmNumberOfPhysicalPages; 763fa2d384SViktor Prutyanov uint64_t MmMaximumNonPagedPoolInBytes; 773fa2d384SViktor Prutyanov uint64_t MmNonPagedSystemStart; 783fa2d384SViktor Prutyanov uint64_t MmNonPagedPoolStart; 793fa2d384SViktor Prutyanov uint64_t MmNonPagedPoolEnd; 803fa2d384SViktor Prutyanov uint64_t MmPagedPoolStart; 813fa2d384SViktor Prutyanov uint64_t MmPagedPoolEnd; 823fa2d384SViktor Prutyanov uint64_t MmPagedPoolInformation; 833fa2d384SViktor Prutyanov uint64_t MmPageSize; 843fa2d384SViktor Prutyanov uint64_t MmSizeOfPagedPoolInBytes; 853fa2d384SViktor Prutyanov uint64_t MmTotalCommitLimit; 863fa2d384SViktor Prutyanov uint64_t MmTotalCommittedPages; 873fa2d384SViktor Prutyanov uint64_t MmSharedCommit; 883fa2d384SViktor Prutyanov uint64_t MmDriverCommit; 893fa2d384SViktor Prutyanov uint64_t MmProcessCommit; 903fa2d384SViktor Prutyanov uint64_t MmPagedPoolCommit; 913fa2d384SViktor Prutyanov uint64_t MmExtendedCommit; 923fa2d384SViktor Prutyanov uint64_t MmZeroedPageListHead; 933fa2d384SViktor Prutyanov uint64_t MmFreePageListHead; 943fa2d384SViktor Prutyanov uint64_t MmStandbyPageListHead; 953fa2d384SViktor Prutyanov uint64_t MmModifiedPageListHead; 963fa2d384SViktor Prutyanov uint64_t MmModifiedNoWritePageListHead; 973fa2d384SViktor Prutyanov uint64_t MmAvailablePages; 983fa2d384SViktor Prutyanov uint64_t MmResidentAvailablePages; 993fa2d384SViktor Prutyanov uint64_t PoolTrackTable; 1003fa2d384SViktor Prutyanov uint64_t NonPagedPoolDescriptor; 1013fa2d384SViktor Prutyanov uint64_t MmHighestUserAddress; 1023fa2d384SViktor Prutyanov uint64_t MmSystemRangeStart; 1033fa2d384SViktor Prutyanov uint64_t MmUserProbeAddress; 1043fa2d384SViktor Prutyanov uint64_t KdPrintCircularBuffer; 1053fa2d384SViktor Prutyanov uint64_t KdPrintCircularBufferEnd; 1063fa2d384SViktor Prutyanov uint64_t KdPrintWritePointer; 1073fa2d384SViktor Prutyanov uint64_t KdPrintRolloverCount; 1083fa2d384SViktor Prutyanov uint64_t MmLoadedUserImageList; 1093fa2d384SViktor Prutyanov 1103fa2d384SViktor Prutyanov /* NT 5.1 Addition */ 1113fa2d384SViktor Prutyanov 1123fa2d384SViktor Prutyanov uint64_t NtBuildLab; 1133fa2d384SViktor Prutyanov uint64_t KiNormalSystemCall; 1143fa2d384SViktor Prutyanov 1153fa2d384SViktor Prutyanov /* NT 5.0 hotfix addition */ 1163fa2d384SViktor Prutyanov 1173fa2d384SViktor Prutyanov uint64_t KiProcessorBlock; 1183fa2d384SViktor Prutyanov uint64_t MmUnloadedDrivers; 1193fa2d384SViktor Prutyanov uint64_t MmLastUnloadedDriver; 1203fa2d384SViktor Prutyanov uint64_t MmTriageActionTaken; 1213fa2d384SViktor Prutyanov uint64_t MmSpecialPoolTag; 1223fa2d384SViktor Prutyanov uint64_t KernelVerifier; 1233fa2d384SViktor Prutyanov uint64_t MmVerifierData; 1243fa2d384SViktor Prutyanov uint64_t MmAllocatedNonPagedPool; 1253fa2d384SViktor Prutyanov uint64_t MmPeakCommitment; 1263fa2d384SViktor Prutyanov uint64_t MmTotalCommitLimitMaximum; 1273fa2d384SViktor Prutyanov uint64_t CmNtCSDVersion; 1283fa2d384SViktor Prutyanov 1293fa2d384SViktor Prutyanov /* NT 5.1 Addition */ 1303fa2d384SViktor Prutyanov 1313fa2d384SViktor Prutyanov uint64_t MmPhysicalMemoryBlock; 1323fa2d384SViktor Prutyanov uint64_t MmSessionBase; 1333fa2d384SViktor Prutyanov uint64_t MmSessionSize; 1343fa2d384SViktor Prutyanov uint64_t MmSystemParentTablePage; 1353fa2d384SViktor Prutyanov 1363fa2d384SViktor Prutyanov /* Server 2003 addition */ 1373fa2d384SViktor Prutyanov 1383fa2d384SViktor Prutyanov uint64_t MmVirtualTranslationBase; 1393fa2d384SViktor Prutyanov uint16_t OffsetKThreadNextProcessor; 1403fa2d384SViktor Prutyanov uint16_t OffsetKThreadTeb; 1413fa2d384SViktor Prutyanov uint16_t OffsetKThreadKernelStack; 1423fa2d384SViktor Prutyanov uint16_t OffsetKThreadInitialStack; 1433fa2d384SViktor Prutyanov uint16_t OffsetKThreadApcProcess; 1443fa2d384SViktor Prutyanov uint16_t OffsetKThreadState; 1453fa2d384SViktor Prutyanov uint16_t OffsetKThreadBStore; 1463fa2d384SViktor Prutyanov uint16_t OffsetKThreadBStoreLimit; 1473fa2d384SViktor Prutyanov uint16_t SizeEProcess; 1483fa2d384SViktor Prutyanov uint16_t OffsetEprocessPeb; 1493fa2d384SViktor Prutyanov uint16_t OffsetEprocessParentCID; 1503fa2d384SViktor Prutyanov uint16_t OffsetEprocessDirectoryTableBase; 1513fa2d384SViktor Prutyanov uint16_t SizePrcb; 1523fa2d384SViktor Prutyanov uint16_t OffsetPrcbDpcRoutine; 1533fa2d384SViktor Prutyanov uint16_t OffsetPrcbCurrentThread; 1543fa2d384SViktor Prutyanov uint16_t OffsetPrcbMhz; 1553fa2d384SViktor Prutyanov uint16_t OffsetPrcbCpuType; 1563fa2d384SViktor Prutyanov uint16_t OffsetPrcbVendorString; 1573fa2d384SViktor Prutyanov uint16_t OffsetPrcbProcStateContext; 1583fa2d384SViktor Prutyanov uint16_t OffsetPrcbNumber; 1593fa2d384SViktor Prutyanov uint16_t SizeEThread; 1603fa2d384SViktor Prutyanov uint64_t KdPrintCircularBufferPtr; 1613fa2d384SViktor Prutyanov uint64_t KdPrintBufferSize; 1623fa2d384SViktor Prutyanov uint64_t KeLoaderBlock; 1633fa2d384SViktor Prutyanov uint16_t SizePcr; 1643fa2d384SViktor Prutyanov uint16_t OffsetPcrSelfPcr; 1653fa2d384SViktor Prutyanov uint16_t OffsetPcrCurrentPrcb; 1663fa2d384SViktor Prutyanov uint16_t OffsetPcrContainedPrcb; 1673fa2d384SViktor Prutyanov uint16_t OffsetPcrInitialBStore; 1683fa2d384SViktor Prutyanov uint16_t OffsetPcrBStoreLimit; 1693fa2d384SViktor Prutyanov uint16_t OffsetPcrInitialStack; 1703fa2d384SViktor Prutyanov uint16_t OffsetPcrStackLimit; 1713fa2d384SViktor Prutyanov uint16_t OffsetPrcbPcrPage; 1723fa2d384SViktor Prutyanov uint16_t OffsetPrcbProcStateSpecialReg; 1733fa2d384SViktor Prutyanov uint16_t GdtR0Code; 1743fa2d384SViktor Prutyanov uint16_t GdtR0Data; 1753fa2d384SViktor Prutyanov uint16_t GdtR0Pcr; 1763fa2d384SViktor Prutyanov uint16_t GdtR3Code; 1773fa2d384SViktor Prutyanov uint16_t GdtR3Data; 1783fa2d384SViktor Prutyanov uint16_t GdtR3Teb; 1793fa2d384SViktor Prutyanov uint16_t GdtLdt; 1803fa2d384SViktor Prutyanov uint16_t GdtTss; 1813fa2d384SViktor Prutyanov uint16_t Gdt64R3CmCode; 1823fa2d384SViktor Prutyanov uint16_t Gdt64R3CmTeb; 1833fa2d384SViktor Prutyanov uint64_t IopNumTriageDumpDataBlocks; 1843fa2d384SViktor Prutyanov uint64_t IopTriageDumpDataBlocks; 1853fa2d384SViktor Prutyanov 1863fa2d384SViktor Prutyanov /* Longhorn addition */ 1873fa2d384SViktor Prutyanov 1883fa2d384SViktor Prutyanov uint64_t VfCrashDataBlock; 1893fa2d384SViktor Prutyanov uint64_t MmBadPagesDetected; 1903fa2d384SViktor Prutyanov uint64_t MmZeroedPageSingleBitErrorsDetected; 1913fa2d384SViktor Prutyanov 1923fa2d384SViktor Prutyanov /* Windows 7 addition */ 1933fa2d384SViktor Prutyanov 1943fa2d384SViktor Prutyanov uint64_t EtwpDebuggerData; 1953fa2d384SViktor Prutyanov uint16_t OffsetPrcbContext; 1963fa2d384SViktor Prutyanov } KDDEBUGGER_DATA64; 1973fa2d384SViktor Prutyanov 1983fa2d384SViktor Prutyanov #endif /* KDBG_H */ 199