[PSDK][NTOS:KD64] Turns out, that even Clang in MSVC mode needs the 64-bits pointer extension hack!

Addendum to commit de81021ba.
Otherwise, we get the following build error:

 \ntoskrnl\kd64\kddata.c(532,5): error: initializer element is not a compile-time constant
      PtrToUL64(RtlpBreakWithStatusInstruction),
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 \ntoskrnl\kd64\kddata.c(526,26): note: expanded from macro 'PtrToUL64'
 #define PtrToUL64(x)    ((ULPTR64)(x))
                          ^~~~~~~~~~~~
This commit is contained in:
Hermès Bélusca-Maïto 2022-11-24 03:22:39 +01:00
parent 375b02f337
commit f7024d6c72
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 4 additions and 3 deletions

View file

@ -519,8 +519,8 @@ DBGKD_GET_VERSION64 KdVersionBlock =
C_ASSERT(sizeof(KDDEBUGGER_DATA64) >= 0x318);
#endif
/* Minimal hackery for GCC, see commit b9cd3f2d9 (r25845) */
#if defined(__GNUC__) && defined(_M_IX86)
#if !defined(_WIN64) && (defined(__GNUC__) || defined(__clang__))
/* Minimal hackery for GCC/Clang, see commit b9cd3f2d9 (r25845) and de81021ba */
#define PtrToUL64(x) ((ULPTR64)(ULONG_PTR)(x))
#else
#define PtrToUL64(x) ((ULPTR64)(x))

View file

@ -175,7 +175,8 @@ typedef struct _DBGKD_DEBUG_DATA_HEADER64
} DBGKD_DEBUG_DATA_HEADER64, *PDBGKD_DEBUG_DATA_HEADER64;
/* Self-documenting type: stores a pointer as a 64-bit quantity */
#if defined(__GNUC__) && defined(_M_IX86) // See commit b9cd3f2d9 (r25845)
#if !defined(_WIN64) && (defined(__GNUC__) || defined(__clang__))
/* Minimal hackery for GCC/Clang, see commit b9cd3f2d9 (r25845) and de81021ba */
typedef union _ULPTR64
{
ULONG_PTR ptr;