From 3743276c37bf4e2ab52ef6bef6f412092b42cd30 Mon Sep 17 00:00:00 2001 From: Philipp Kerling Date: Mon, 22 Feb 2021 07:39:07 +0100 Subject: [PATCH] Add assertion failure variant for win kernel --- source/assert.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/assert.cpp b/source/assert.cpp index 7d32d5ec..5c812a06 100644 --- a/source/assert.cpp +++ b/source/assert.cpp @@ -7,7 +7,9 @@ #include #include -#if defined(EA_PLATFORM_MICROSOFT) +#if defined(EA_PLATFORM_WINDOWS_KERNEL) + #include +#elif defined(EA_PLATFORM_MICROSOFT) EA_DISABLE_ALL_VC_WARNINGS(); #if defined(EA_COMPILER_MSVC) #include @@ -62,7 +64,9 @@ namespace eastl EASTL_API void AssertionFailureFunctionDefault(const char* pExpression, void* /*pContext*/) { #if EASTL_ASSERT_ENABLED - #if defined(EA_PLATFORM_MICROSOFT) + #if defined(EA_PLATFORM_WINDOWS_KERNEL) + DbgPrintEx(DPFLTR_IHVDRIVER_ID, DPFLTR_ERROR_LEVEL, "%s", pExpression); + #elif defined(EA_PLATFORM_MICROSOFT) printf("%s\n", pExpression); // Write the message to stdout if( ::IsDebuggerPresent()) {