Skip to content

Commit

Permalink
Merge pull request #415 from mtnpke/km_assert
Browse files Browse the repository at this point in the history
Add assertion failure variant for win kernel
  • Loading branch information
james-moran-ea authored Feb 10, 2022
2 parents 0700f63 + 3743276 commit 29a805e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions source/assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
#include <EASTL/string.h>
#include <EABase/eabase.h>

#if defined(EA_PLATFORM_MICROSOFT)
#if defined(EA_PLATFORM_WINDOWS_KERNEL)
#include <Wdm.h>
#elif defined(EA_PLATFORM_MICROSOFT)
EA_DISABLE_ALL_VC_WARNINGS();
#if defined(EA_COMPILER_MSVC)
#include <crtdbg.h>
Expand Down Expand Up @@ -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())
{
Expand Down

0 comments on commit 29a805e

Please sign in to comment.