[PSDK][NTOS:KD64] Rename GCC_ULONG64 to ULPTR64 to self-document the fact it stores a pointer as a 64-bit quantity.

But the underlying GCC stupidity is still there (15 years later).

However, enable it only in 32-bit GCC builds, not in 64-bits nor with MSVC.
See commit b9cd3f2d9 (r25845) for some details.

GCC is indeed still incapable of casting 32-bit pointers up to 64-bits,
when static-initializing arrays (**outside** a function) without emitting
the error:

  "error: initializer element is not constant"

(which might somehow indicate it actually tries to generate executable
code for casting the pointers, instead of doing it at compile-time).

Going down the rabbit hole, other stupidities show up:

Our PVOID64 type and the related POINTER_64 (in 32-bit archs), or the
PVOID32 and POINTER_32 (in 64-bit archs), are all silently broken in
GCC builds, because the pointer size attributes __ptr64 and __ptr32,
which are originally MSVC-specific, are defined to nothing in _mingw.h.
(And similarly for the __uptr and __sptr sign-extension attributes.)

Clang and other sane ompilers has since then implemented those (enabled
with -fms-extensions), but not GCC. The closest thing that could exist
for GCC is to do:

  #define __ptr64 __attribute__((mode(DI)))

in order to get a 64-bit-sized pointer type with

  typedef void* __ptr64 PVOID64;

but even this does not work, with the error:

  "error: invalid pointer mode 'DI'"
This commit is contained in:
Hermès Bélusca-Maïto 2022-11-23 16:46:35 +01:00
parent 1c0950b557
commit de81021bab
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 182 additions and 170 deletions

View file

@ -518,11 +518,17 @@ DBGKD_GET_VERSION64 KdVersionBlock =
C_ASSERT(sizeof(KDDEBUGGER_DATA64) >= 0x318); C_ASSERT(sizeof(KDDEBUGGER_DATA64) >= 0x318);
#endif #endif
/* Minimal hackery for GCC, see commit b9cd3f2d9 (r25845) */
#if defined(__GNUC__) && defined(_M_IX86)
#define PtrToUL64(x) ((ULPTR64)(ULONG_PTR)(x))
#else
#define PtrToUL64(x) ((ULPTR64)(x))
#endif
KDDEBUGGER_DATA64 KdDebuggerDataBlock = KDDEBUGGER_DATA64 KdDebuggerDataBlock =
{ {
{{0}}, {{0}},
0, 0,
{(ULONG_PTR)RtlpBreakWithStatusInstruction}, PtrToUL64(RtlpBreakWithStatusInstruction),
0, 0,
FIELD_OFFSET(KTHREAD, CallbackStack), FIELD_OFFSET(KTHREAD, CallbackStack),
#if defined(_M_ARM) || defined(_M_AMD64) #if defined(_M_ARM) || defined(_M_AMD64)
@ -533,82 +539,82 @@ KDDEBUGGER_DATA64 KdDebuggerDataBlock =
FIELD_OFFSET(KCALLOUT_FRAME, CBSTACK_FRAME_POINTER), FIELD_OFFSET(KCALLOUT_FRAME, CBSTACK_FRAME_POINTER),
#endif #endif
FALSE, FALSE,
{(ULONG_PTR)KiCallUserMode}, PtrToUL64(KiCallUserMode),
0, 0,
{(ULONG_PTR)&PsLoadedModuleList}, PtrToUL64(&PsLoadedModuleList),
{(ULONG_PTR)&PsActiveProcessHead}, PtrToUL64(&PsActiveProcessHead),
{(ULONG_PTR)&PspCidTable}, PtrToUL64(&PspCidTable),
{(ULONG_PTR)&ExpSystemResourcesList}, PtrToUL64(&ExpSystemResourcesList),
{(ULONG_PTR)ExpPagedPoolDescriptor}, PtrToUL64(ExpPagedPoolDescriptor),
{(ULONG_PTR)&ExpNumberOfPagedPools}, PtrToUL64(&ExpNumberOfPagedPools),
{(ULONG_PTR)&KeTimeIncrement}, PtrToUL64(&KeTimeIncrement),
{(ULONG_PTR)&KeBugcheckCallbackListHead}, PtrToUL64(&KeBugcheckCallbackListHead),
{(ULONG_PTR)KiBugCheckData}, PtrToUL64(KiBugCheckData),
{(ULONG_PTR)&IopErrorLogListHead}, PtrToUL64(&IopErrorLogListHead),
{(ULONG_PTR)&ObpRootDirectoryObject}, PtrToUL64(&ObpRootDirectoryObject),
{(ULONG_PTR)&ObpTypeObjectType}, PtrToUL64(&ObpTypeObjectType),
{(ULONG_PTR)&MmSystemCacheStart}, PtrToUL64(&MmSystemCacheStart),
{(ULONG_PTR)&MmSystemCacheEnd}, PtrToUL64(&MmSystemCacheEnd),
{(ULONG_PTR)&MmSystemCacheWs}, PtrToUL64(&MmSystemCacheWs),
{(ULONG_PTR)&MmPfnDatabase}, PtrToUL64(&MmPfnDatabase),
{(ULONG_PTR)MmSystemPtesStart}, PtrToUL64(MmSystemPtesStart),
{(ULONG_PTR)MmSystemPtesEnd}, PtrToUL64(MmSystemPtesEnd),
{(ULONG_PTR)&MmSubsectionBase}, PtrToUL64(&MmSubsectionBase),
{(ULONG_PTR)&MmNumberOfPagingFiles}, PtrToUL64(&MmNumberOfPagingFiles),
{(ULONG_PTR)&MmLowestPhysicalPage}, PtrToUL64(&MmLowestPhysicalPage),
{(ULONG_PTR)&MmHighestPhysicalPage}, PtrToUL64(&MmHighestPhysicalPage),
{(ULONG_PTR)&MmNumberOfPhysicalPages}, PtrToUL64(&MmNumberOfPhysicalPages),
{(ULONG_PTR)&MmMaximumNonPagedPoolInBytes}, PtrToUL64(&MmMaximumNonPagedPoolInBytes),
{(ULONG_PTR)&MmNonPagedSystemStart}, PtrToUL64(&MmNonPagedSystemStart),
{(ULONG_PTR)&MmNonPagedPoolStart}, PtrToUL64(&MmNonPagedPoolStart),
{(ULONG_PTR)&MmNonPagedPoolEnd}, PtrToUL64(&MmNonPagedPoolEnd),
{(ULONG_PTR)&MmPagedPoolStart}, PtrToUL64(&MmPagedPoolStart),
{(ULONG_PTR)&MmPagedPoolEnd}, PtrToUL64(&MmPagedPoolEnd),
{(ULONG_PTR)&MmPagedPoolInfo}, PtrToUL64(&MmPagedPoolInfo),
PAGE_SIZE, PAGE_SIZE,
{(ULONG_PTR)&MmSizeOfPagedPoolInBytes}, PtrToUL64(&MmSizeOfPagedPoolInBytes),
{(ULONG_PTR)&MmTotalCommitLimit}, PtrToUL64(&MmTotalCommitLimit),
{(ULONG_PTR)&MmTotalCommittedPages}, PtrToUL64(&MmTotalCommittedPages),
{(ULONG_PTR)&MmSharedCommit}, PtrToUL64(&MmSharedCommit),
{(ULONG_PTR)&MmDriverCommit}, PtrToUL64(&MmDriverCommit),
{(ULONG_PTR)&MmProcessCommit}, PtrToUL64(&MmProcessCommit),
{(ULONG_PTR)&MmPagedPoolCommit}, PtrToUL64(&MmPagedPoolCommit),
{0}, PtrToUL64(0),
{(ULONG_PTR)&MmZeroedPageListHead}, PtrToUL64(&MmZeroedPageListHead),
{(ULONG_PTR)&MmFreePageListHead}, PtrToUL64(&MmFreePageListHead),
{(ULONG_PTR)&MmStandbyPageListHead}, PtrToUL64(&MmStandbyPageListHead),
{(ULONG_PTR)&MmModifiedPageListHead}, PtrToUL64(&MmModifiedPageListHead),
{(ULONG_PTR)&MmModifiedNoWritePageListHead}, PtrToUL64(&MmModifiedNoWritePageListHead),
{(ULONG_PTR)&MmAvailablePages}, PtrToUL64(&MmAvailablePages),
{(ULONG_PTR)&MmResidentAvailablePages}, PtrToUL64(&MmResidentAvailablePages),
{(ULONG_PTR)&PoolTrackTable}, PtrToUL64(&PoolTrackTable),
{(ULONG_PTR)&NonPagedPoolDescriptor}, PtrToUL64(&NonPagedPoolDescriptor),
{(ULONG_PTR)&MmHighestUserAddress}, PtrToUL64(&MmHighestUserAddress),
{(ULONG_PTR)&MmSystemRangeStart}, PtrToUL64(&MmSystemRangeStart),
{(ULONG_PTR)&MmUserProbeAddress}, PtrToUL64(&MmUserProbeAddress),
{(ULONG_PTR)KdPrintDefaultCircularBuffer}, PtrToUL64(KdPrintDefaultCircularBuffer),
{(ULONG_PTR)KdPrintDefaultCircularBuffer + 1}, PtrToUL64(KdPrintDefaultCircularBuffer + 1),
{(ULONG_PTR)&KdPrintWritePointer}, PtrToUL64(&KdPrintWritePointer),
{(ULONG_PTR)&KdPrintRolloverCount}, PtrToUL64(&KdPrintRolloverCount),
{(ULONG_PTR)&MmLoadedUserImageList}, PtrToUL64(&MmLoadedUserImageList),
{(ULONG_PTR)&NtBuildLab}, PtrToUL64(&NtBuildLab),
{0}, PtrToUL64(0),
{(ULONG_PTR)KiProcessorBlock}, PtrToUL64(KiProcessorBlock),
{(ULONG_PTR)&MmUnloadedDrivers}, PtrToUL64(&MmUnloadedDrivers),
{(ULONG_PTR)&MmLastUnloadedDrivers}, PtrToUL64(&MmLastUnloadedDrivers),
{(ULONG_PTR)&MmTriageActionTaken}, PtrToUL64(&MmTriageActionTaken),
{(ULONG_PTR)&MmSpecialPoolTag}, PtrToUL64(&MmSpecialPoolTag),
{(ULONG_PTR)&KernelVerifier}, PtrToUL64(&KernelVerifier),
{(ULONG_PTR)&MmVerifierData}, PtrToUL64(&MmVerifierData),
{(ULONG_PTR)&MmAllocatedNonPagedPool}, PtrToUL64(&MmAllocatedNonPagedPool),
{(ULONG_PTR)&MmPeakCommitment}, PtrToUL64(&MmPeakCommitment),
{(ULONG_PTR)&MmtotalCommitLimitMaximum}, PtrToUL64(&MmtotalCommitLimitMaximum),
{(ULONG_PTR)&CmNtCSDVersion}, PtrToUL64(&CmNtCSDVersion),
{(ULONG_PTR)&MmPhysicalMemoryBlock}, PtrToUL64(&MmPhysicalMemoryBlock),
{(ULONG_PTR)&MmSessionBase}, PtrToUL64(&MmSessionBase),
{(ULONG_PTR)&MmSessionSize}, PtrToUL64(&MmSessionSize),
{0}, PtrToUL64(0),
{0}, PtrToUL64(0),
FIELD_OFFSET(KTHREAD, NextProcessor), FIELD_OFFSET(KTHREAD, NextProcessor),
FIELD_OFFSET(KTHREAD, Teb), FIELD_OFFSET(KTHREAD, Teb),
FIELD_OFFSET(KTHREAD, KernelStack), FIELD_OFFSET(KTHREAD, KernelStack),
@ -630,9 +636,9 @@ KDDEBUGGER_DATA64 KdDebuggerDataBlock =
FIELD_OFFSET(KPRCB, ProcessorState.ContextFrame), FIELD_OFFSET(KPRCB, ProcessorState.ContextFrame),
FIELD_OFFSET(KPRCB, Number), FIELD_OFFSET(KPRCB, Number),
sizeof(ETHREAD), sizeof(ETHREAD),
{(ULONG_PTR)KdPrintDefaultCircularBuffer}, PtrToUL64(&KdPrintDefaultCircularBuffer),
{(ULONG_PTR)&KdPrintBufferSize}, PtrToUL64(&KdPrintBufferSize),
{(ULONG_PTR)&KeLoaderBlock}, PtrToUL64(&KeLoaderBlock),
sizeof(KPCR), sizeof(KPCR),
KPCR_SELF_PCR_OFFSET, KPCR_SELF_PCR_OFFSET,
KPCR_CURRENT_PRCB_OFFSET, KPCR_CURRENT_PRCB_OFFSET,
@ -693,8 +699,8 @@ KDDEBUGGER_DATA64 KdDebuggerDataBlock =
0, 0,
0, 0,
#endif #endif
{(ULONG_PTR)&IopNumTriageDumpDataBlocks}, PtrToUL64(&IopNumTriageDumpDataBlocks),
{(ULONG_PTR)IopTriageDumpDataBlocks}, PtrToUL64(IopTriageDumpDataBlocks),
#if (NTDDI_VERSION >= NTDDI_LONGHORN) #if (NTDDI_VERSION >= NTDDI_LONGHORN)
#error KdDebuggerDataBlock requires other fields for this NT version! #error KdDebuggerDataBlock requires other fields for this NT version!

View file

@ -174,110 +174,116 @@ typedef struct _DBGKD_DEBUG_DATA_HEADER64
ULONG Size; ULONG Size;
} DBGKD_DEBUG_DATA_HEADER64, *PDBGKD_DEBUG_DATA_HEADER64; } DBGKD_DEBUG_DATA_HEADER64, *PDBGKD_DEBUG_DATA_HEADER64;
typedef union _GCC_ULONG64 /* Self-documenting type: stores a pointer as a 64-bit quantity */
#if defined(__GNUC__) && defined(_M_IX86) // See commit b9cd3f2d9 (r25845)
typedef union _ULPTR64
{ {
ULONG_PTR Pointer; ULONG_PTR ptr;
ULONG64 RealPointer; ULONG64 ptr64;
} GCC_ULONG64, *PGCC_ULONG64; } ULPTR64;
#else
// #define ULPTR64 PVOID64
#define ULPTR64 ULONG64
#endif
typedef struct _KDDEBUGGER_DATA64 typedef struct _KDDEBUGGER_DATA64
{ {
DBGKD_DEBUG_DATA_HEADER64 Header; DBGKD_DEBUG_DATA_HEADER64 Header;
ULONG64 KernBase; ULONG64 KernBase;
GCC_ULONG64 BreakpointWithStatus; ULPTR64 BreakpointWithStatus;
ULONG64 SavedContext; ULONG64 SavedContext;
USHORT ThCallbackStack; USHORT ThCallbackStack;
USHORT NextCallback; USHORT NextCallback;
USHORT FramePointer; USHORT FramePointer;
USHORT PaeEnabled:1; USHORT PaeEnabled:1;
GCC_ULONG64 KiCallUserMode; ULPTR64 KiCallUserMode;
ULONG64 KeUserCallbackDispatcher; ULONG64 KeUserCallbackDispatcher;
GCC_ULONG64 PsLoadedModuleList; ULPTR64 PsLoadedModuleList;
GCC_ULONG64 PsActiveProcessHead; ULPTR64 PsActiveProcessHead;
GCC_ULONG64 PspCidTable; ULPTR64 PspCidTable;
GCC_ULONG64 ExpSystemResourcesList; ULPTR64 ExpSystemResourcesList;
GCC_ULONG64 ExpPagedPoolDescriptor; ULPTR64 ExpPagedPoolDescriptor;
GCC_ULONG64 ExpNumberOfPagedPools; ULPTR64 ExpNumberOfPagedPools;
GCC_ULONG64 KeTimeIncrement; ULPTR64 KeTimeIncrement;
GCC_ULONG64 KeBugCheckCallbackListHead; ULPTR64 KeBugCheckCallbackListHead;
GCC_ULONG64 KiBugcheckData; ULPTR64 KiBugcheckData;
GCC_ULONG64 IopErrorLogListHead; ULPTR64 IopErrorLogListHead;
GCC_ULONG64 ObpRootDirectoryObject; ULPTR64 ObpRootDirectoryObject;
GCC_ULONG64 ObpTypeObjectType; ULPTR64 ObpTypeObjectType;
GCC_ULONG64 MmSystemCacheStart; ULPTR64 MmSystemCacheStart;
GCC_ULONG64 MmSystemCacheEnd; ULPTR64 MmSystemCacheEnd;
GCC_ULONG64 MmSystemCacheWs; ULPTR64 MmSystemCacheWs;
GCC_ULONG64 MmPfnDatabase; ULPTR64 MmPfnDatabase;
GCC_ULONG64 MmSystemPtesStart; ULPTR64 MmSystemPtesStart;
GCC_ULONG64 MmSystemPtesEnd; ULPTR64 MmSystemPtesEnd;
GCC_ULONG64 MmSubsectionBase; ULPTR64 MmSubsectionBase;
GCC_ULONG64 MmNumberOfPagingFiles; ULPTR64 MmNumberOfPagingFiles;
GCC_ULONG64 MmLowestPhysicalPage; ULPTR64 MmLowestPhysicalPage;
GCC_ULONG64 MmHighestPhysicalPage; ULPTR64 MmHighestPhysicalPage;
GCC_ULONG64 MmNumberOfPhysicalPages; ULPTR64 MmNumberOfPhysicalPages;
GCC_ULONG64 MmMaximumNonPagedPoolInBytes; ULPTR64 MmMaximumNonPagedPoolInBytes;
GCC_ULONG64 MmNonPagedSystemStart; ULPTR64 MmNonPagedSystemStart;
GCC_ULONG64 MmNonPagedPoolStart; ULPTR64 MmNonPagedPoolStart;
GCC_ULONG64 MmNonPagedPoolEnd; ULPTR64 MmNonPagedPoolEnd;
GCC_ULONG64 MmPagedPoolStart; ULPTR64 MmPagedPoolStart;
GCC_ULONG64 MmPagedPoolEnd; ULPTR64 MmPagedPoolEnd;
GCC_ULONG64 MmPagedPoolInformation; ULPTR64 MmPagedPoolInformation;
ULONG64 MmPageSize; ULONG64 MmPageSize;
GCC_ULONG64 MmSizeOfPagedPoolInBytes; ULPTR64 MmSizeOfPagedPoolInBytes;
GCC_ULONG64 MmTotalCommitLimit; ULPTR64 MmTotalCommitLimit;
GCC_ULONG64 MmTotalCommittedPages; ULPTR64 MmTotalCommittedPages;
GCC_ULONG64 MmSharedCommit; ULPTR64 MmSharedCommit;
GCC_ULONG64 MmDriverCommit; ULPTR64 MmDriverCommit;
GCC_ULONG64 MmProcessCommit; ULPTR64 MmProcessCommit;
GCC_ULONG64 MmPagedPoolCommit; ULPTR64 MmPagedPoolCommit;
GCC_ULONG64 MmExtendedCommit; ULPTR64 MmExtendedCommit;
GCC_ULONG64 MmZeroedPageListHead; ULPTR64 MmZeroedPageListHead;
GCC_ULONG64 MmFreePageListHead; ULPTR64 MmFreePageListHead;
GCC_ULONG64 MmStandbyPageListHead; ULPTR64 MmStandbyPageListHead;
GCC_ULONG64 MmModifiedPageListHead; ULPTR64 MmModifiedPageListHead;
GCC_ULONG64 MmModifiedNoWritePageListHead; ULPTR64 MmModifiedNoWritePageListHead;
GCC_ULONG64 MmAvailablePages; ULPTR64 MmAvailablePages;
GCC_ULONG64 MmResidentAvailablePages; ULPTR64 MmResidentAvailablePages;
GCC_ULONG64 PoolTrackTable; ULPTR64 PoolTrackTable;
GCC_ULONG64 NonPagedPoolDescriptor; ULPTR64 NonPagedPoolDescriptor;
GCC_ULONG64 MmHighestUserAddress; ULPTR64 MmHighestUserAddress;
GCC_ULONG64 MmSystemRangeStart; ULPTR64 MmSystemRangeStart;
GCC_ULONG64 MmUserProbeAddress; ULPTR64 MmUserProbeAddress;
GCC_ULONG64 KdPrintCircularBuffer; ULPTR64 KdPrintCircularBuffer;
GCC_ULONG64 KdPrintCircularBufferEnd; ULPTR64 KdPrintCircularBufferEnd;
GCC_ULONG64 KdPrintWritePointer; ULPTR64 KdPrintWritePointer;
GCC_ULONG64 KdPrintRolloverCount; ULPTR64 KdPrintRolloverCount;
GCC_ULONG64 MmLoadedUserImageList; ULPTR64 MmLoadedUserImageList;
#if (NTDDI_VERSION >= NTDDI_WINXP) #if (NTDDI_VERSION >= NTDDI_WINXP)
GCC_ULONG64 NtBuildLab; ULPTR64 NtBuildLab;
GCC_ULONG64 KiNormalSystemCall; ULPTR64 KiNormalSystemCall;
#endif #endif
/* NOTE: Documented as "NT 5.0 hotfix (QFE) addition" */ /* NOTE: Documented as "NT 5.0 hotfix (QFE) addition" */
#if (NTDDI_VERSION >= NTDDI_WIN2KSP4) #if (NTDDI_VERSION >= NTDDI_WIN2KSP4)
GCC_ULONG64 KiProcessorBlock; ULPTR64 KiProcessorBlock;
GCC_ULONG64 MmUnloadedDrivers; ULPTR64 MmUnloadedDrivers;
GCC_ULONG64 MmLastUnloadedDriver; ULPTR64 MmLastUnloadedDriver;
GCC_ULONG64 MmTriageActionTaken; ULPTR64 MmTriageActionTaken;
GCC_ULONG64 MmSpecialPoolTag; ULPTR64 MmSpecialPoolTag;
GCC_ULONG64 KernelVerifier; ULPTR64 KernelVerifier;
GCC_ULONG64 MmVerifierData; ULPTR64 MmVerifierData;
GCC_ULONG64 MmAllocatedNonPagedPool; ULPTR64 MmAllocatedNonPagedPool;
GCC_ULONG64 MmPeakCommitment; ULPTR64 MmPeakCommitment;
GCC_ULONG64 MmTotalCommitLimitMaximum; ULPTR64 MmTotalCommitLimitMaximum;
GCC_ULONG64 CmNtCSDVersion; ULPTR64 CmNtCSDVersion;
#endif #endif
#if (NTDDI_VERSION >= NTDDI_WINXP) #if (NTDDI_VERSION >= NTDDI_WINXP)
GCC_ULONG64 MmPhysicalMemoryBlock; ULPTR64 MmPhysicalMemoryBlock;
GCC_ULONG64 MmSessionBase; ULPTR64 MmSessionBase;
GCC_ULONG64 MmSessionSize; ULPTR64 MmSessionSize;
GCC_ULONG64 MmSystemParentTablePage; ULPTR64 MmSystemParentTablePage;
#endif #endif
#if (NTDDI_VERSION >= NTDDI_WS03) #if (NTDDI_VERSION >= NTDDI_WS03)
GCC_ULONG64 MmVirtualTranslationBase; ULPTR64 MmVirtualTranslationBase;
USHORT OffsetKThreadNextProcessor; USHORT OffsetKThreadNextProcessor;
USHORT OffsetKThreadTeb; USHORT OffsetKThreadTeb;
USHORT OffsetKThreadKernelStack; USHORT OffsetKThreadKernelStack;
@ -299,9 +305,9 @@ typedef struct _KDDEBUGGER_DATA64
USHORT OffsetPrcbProcStateContext; USHORT OffsetPrcbProcStateContext;
USHORT OffsetPrcbNumber; USHORT OffsetPrcbNumber;
USHORT SizeEThread; USHORT SizeEThread;
GCC_ULONG64 KdPrintCircularBufferPtr; ULPTR64 KdPrintCircularBufferPtr;
GCC_ULONG64 KdPrintBufferSize; ULPTR64 KdPrintBufferSize;
GCC_ULONG64 KeLoaderBlock; ULPTR64 KeLoaderBlock;
USHORT SizePcr; USHORT SizePcr;
USHORT OffsetPcrSelfPcr; USHORT OffsetPcrSelfPcr;
USHORT OffsetPcrCurrentPrcb; USHORT OffsetPcrCurrentPrcb;
@ -322,18 +328,18 @@ typedef struct _KDDEBUGGER_DATA64
USHORT GdtTss; USHORT GdtTss;
USHORT Gdt64R3CmCode; USHORT Gdt64R3CmCode;
USHORT Gdt64R3CmTeb; USHORT Gdt64R3CmTeb;
GCC_ULONG64 IopNumTriageDumpDataBlocks; ULPTR64 IopNumTriageDumpDataBlocks;
GCC_ULONG64 IopTriageDumpDataBlocks; ULPTR64 IopTriageDumpDataBlocks;
#endif #endif
#if (NTDDI_VERSION >= NTDDI_LONGHORN) #if (NTDDI_VERSION >= NTDDI_LONGHORN)
GCC_ULONG64 VfCrashDataBlock; ULPTR64 VfCrashDataBlock;
GCC_ULONG64 MmBadPagesDetected; ULPTR64 MmBadPagesDetected;
GCC_ULONG64 MmZeroedPageSingleBitErrorsDetected; ULPTR64 MmZeroedPageSingleBitErrorsDetected;
#endif #endif
#if (NTDDI_VERSION >= NTDDI_WIN7) #if (NTDDI_VERSION >= NTDDI_WIN7)
GCC_ULONG64 EtwpDebuggerData; ULPTR64 EtwpDebuggerData;
USHORT OffsetPrcbContext; USHORT OffsetPrcbContext;
#endif #endif
@ -358,11 +364,11 @@ typedef struct _KDDEBUGGER_DATA64
#if (NTDDI_VERSION >= NTDDI_WIN10_RS1) #if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
USHORT Padding; USHORT Padding;
GCC_ULONG64 PteBase; ULPTR64 PteBase;
#endif #endif
#if (NTDDI_VERSION >= NTDDI_WIN10_RS5) #if (NTDDI_VERSION >= NTDDI_WIN10_RS5)
GCC_ULONG64 RetpolineStubFunctionTable; ULPTR64 RetpolineStubFunctionTable;
ULONG RetpolineStubFunctionTableSize; ULONG RetpolineStubFunctionTableSize;
ULONG RetpolineStubOffset; ULONG RetpolineStubOffset;
ULONG RetpolineStubSize; ULONG RetpolineStubSize;