X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FLibrary%2FBaseDebugLibNull%2FDebugLib.c;h=d45782109561c92d11d2488fd81f60e6bbe10da4;hp=eeaf7859d311ee68eccfd42c1c1bb8d41917a5b3;hb=c7d265a94a3ee2517430e4f19f5b24482e5e7132;hpb=511710d68f477e0210ae1830769e5d0cde4ea36a diff --git a/MdePkg/Library/BaseDebugLibNull/DebugLib.c b/MdePkg/Library/BaseDebugLibNull/DebugLib.c index eeaf7859d3..d457821095 100644 --- a/MdePkg/Library/BaseDebugLibNull/DebugLib.c +++ b/MdePkg/Library/BaseDebugLibNull/DebugLib.c @@ -13,9 +13,14 @@ **/ // -// Define the maximum debug and assert message length that this library supports +// The package level header files this module uses // -#define MAX_DEBUG_MESSAGE_LENGTH 0x100 +#include + +// +// The Library classes this module produced +// +#include /** @@ -39,20 +44,6 @@ DebugPrint ( ... ) { - CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH]; - VA_LIST Marker; - - // - // If Format is NULL, then ASSERT(). - // - ASSERT (Format != NULL); - - // - // Print the assert message to a buffer - // - VA_START (Marker, Format); - AsciiVSPrint (Buffer, sizeof (Buffer), Format, Marker); - VA_END (Marker); } @@ -87,21 +78,6 @@ DebugAssert ( IN CONST CHAR8 *Description ) { - CHAR8 Buffer[MAX_DEBUG_MESSAGE_LENGTH]; - - // - // Print the assert message to a buffer - // - AsciiSPrint (Buffer, sizeof (Buffer), "ASSERT %s(%d): %s\n", FileName, LineNumber, Description); - - // - // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings - // - if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) { - CpuBreakpoint (); - } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) { - CpuDeadLoop (); - } } @@ -129,15 +105,7 @@ DebugClearMemory ( IN UINTN Length ) { - // - // If Buffer is NULL, then ASSERT(). - // - ASSERT (Buffer != NULL); - - // - // SetMem() checks for the the ASSERT() condition on Length and returns Buffer - // - return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue)); + return Buffer; } @@ -158,7 +126,7 @@ DebugAssertEnabled ( VOID ) { - return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0); + return FALSE; } @@ -179,7 +147,7 @@ DebugPrintEnabled ( VOID ) { - return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0); + return FALSE; } @@ -200,7 +168,7 @@ DebugCodeEnabled ( VOID ) { - return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0); + return FALSE; } @@ -221,5 +189,5 @@ DebugClearMemoryEnabled ( VOID ) { - return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0); + return FALSE; }