]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseDebugLibNull/DebugLib.c
remove some comments introduced by tools.
[mirror_edk2.git] / MdePkg / Library / BaseDebugLibNull / DebugLib.c
index 9081b632d886bcb0e227795f8f4fbc6b071dd082..5034317d49f23db419c79d42eca4ff8aba4d805d 100644 (file)
 \r
 **/\r
 \r
+\r
+#include <Base.h>\r
+\r
 //\r
-// Define the maximum debug and assert message length that this library supports \r
+// The Library classes this module produced\r
 //\r
-#define MAX_DEBUG_MESSAGE_LENGTH  0x100\r
+#include <Library/DebugLib.h>\r
 \r
 /**\r
 \r
@@ -39,20 +42,6 @@ DebugPrint (
   ...\r
   )\r
 {\r
-  CHAR8    Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
-  VA_LIST  Marker;\r
-\r
-  //\r
-  // If Format is NULL, then ASSERT().\r
-  //\r
-  ASSERT (Format != NULL);\r
-\r
-  //\r
-  // Print the assert message to a buffer\r
-  //\r
-  VA_START (Marker, Format);\r
-  AsciiVSPrint (Buffer, sizeof (Buffer), Format, Marker);\r
-  VA_END (Marker);\r
 }\r
 \r
 \r
@@ -83,25 +72,10 @@ VOID
 EFIAPI\r
 DebugAssert (\r
   IN CONST CHAR8  *FileName,\r
-  IN INTN         LineNumber,\r
+  IN UINTN        LineNumber,\r
   IN CONST CHAR8  *Description\r
   )\r
 {\r
-  CHAR8  Buffer[MAX_DEBUG_MESSAGE_LENGTH];\r
-\r
-  //\r
-  // Print the assert message to a buffer\r
-  //\r
-  AsciiSPrint (Buffer, sizeof (Buffer), "ASSERT %s(%d): %s\n", FileName, LineNumber, Description);\r
-\r
-  //\r
-  // Generate a Breakpoint, DeadLoop, or NOP based on PCD settings\r
-  //\r
-  if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED) != 0) {\r
-    CpuBreakpoint ();\r
-  } else if ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED) != 0) {\r
-    CpuDeadLoop ();\r
-  }\r
 }\r
 \r
 \r
@@ -114,7 +88,7 @@ DebugAssert (
 \r
   If Buffer is NULL, then ASSERT().\r
 \r
-  If Length is greater than (MAX_ADDRESS \96 Buffer + 1), then ASSERT(). \r
+  If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT(). \r
 \r
   @param   Buffer  Pointer to the target buffer to fill with PcdDebugClearMemoryValue.\r
   @param   Length  Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. \r
@@ -129,15 +103,7 @@ DebugClearMemory (
   IN UINTN  Length\r
   )\r
 {\r
-  //\r
-  // If Buffer is NULL, then ASSERT().\r
-  //\r
-  ASSERT (Buffer != NULL);\r
-\r
-  //\r
-  // SetMem() checks for the the ASSERT() condition on Length and returns Buffer\r
-  //\r
-  return SetMem (Buffer, Length, PcdGet8(PcdDebugClearMemoryValue));\r
+  return Buffer;\r
 }\r
 \r
 \r
@@ -158,7 +124,7 @@ DebugAssertEnabled (
   VOID\r
   )\r
 {\r
-  return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);\r
+  return FALSE;\r
 }\r
 \r
 \r
@@ -179,7 +145,7 @@ DebugPrintEnabled (
   VOID\r
   )\r
 {\r
-  return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);\r
+  return FALSE;\r
 }\r
 \r
 \r
@@ -200,7 +166,7 @@ DebugCodeEnabled (
   VOID\r
   )\r
 {\r
-  return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);\r
+  return FALSE;\r
 }\r
 \r
 \r
@@ -221,5 +187,5 @@ DebugClearMemoryEnabled (
   VOID\r
   )\r
 {\r
-  return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);\r
+  return FALSE;\r
 }\r