]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/DebugLib.h
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Include / Library / DebugLib.h
index 056ceb63adbbb9f81c46ede4417f31a94d10591a..8d3d08638d7372e42b25dad1289d1c3428a3f6f7 100644 (file)
@@ -48,7 +48,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #define DEBUG_CACHE     0x00200000  // Memory range cachability changes\r
 #define DEBUG_VERBOSE   0x00400000  // Detailed debug messages that may\r
                                     // significantly impact boot performance\r
-#define DEBUG_ERROR     0x80000000  // Error\r
+#define DEBUG_ERROR  0x80000000     // Error\r
 \r
 //\r
 // Aliases of debug message mask bits\r
@@ -129,7 +129,6 @@ DebugPrint (
   ...\r
   );\r
 \r
-\r
 /**\r
   Prints a debug message to the debug output device if the specified\r
   error level is enabled.\r
@@ -148,12 +147,11 @@ DebugPrint (
 VOID\r
 EFIAPI\r
 DebugVPrint (\r
-  IN  UINTN         ErrorLevel,\r
-  IN  CONST CHAR8   *Format,\r
-  IN  VA_LIST       VaListMarker\r
+  IN  UINTN        ErrorLevel,\r
+  IN  CONST CHAR8  *Format,\r
+  IN  VA_LIST      VaListMarker\r
   );\r
 \r
-\r
 /**\r
   Prints a debug message to the debug output device if the specified\r
   error level is enabled.\r
@@ -174,12 +172,11 @@ DebugVPrint (
 VOID\r
 EFIAPI\r
 DebugBPrint (\r
-  IN  UINTN         ErrorLevel,\r
-  IN  CONST CHAR8   *Format,\r
-  IN  BASE_LIST     BaseListMarker\r
+  IN  UINTN        ErrorLevel,\r
+  IN  CONST CHAR8  *Format,\r
+  IN  BASE_LIST    BaseListMarker\r
   );\r
 \r
-\r
 /**\r
   Prints an assert message containing a filename, line number, and description.\r
   This may be followed by a breakpoint or a dead loop.\r
@@ -209,7 +206,6 @@ DebugAssert (
   IN CONST CHAR8  *Description\r
   );\r
 \r
-\r
 /**\r
   Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer.\r
 \r
@@ -232,7 +228,6 @@ DebugClearMemory (
   IN UINTN  Length\r
   );\r
 \r
-\r
 /**\r
   Returns TRUE if ASSERT() macros are enabled.\r
 \r
@@ -249,7 +244,6 @@ DebugAssertEnabled (
   VOID\r
   );\r
 \r
-\r
 /**\r
   Returns TRUE if DEBUG() macros are enabled.\r
 \r
@@ -266,7 +260,6 @@ DebugPrintEnabled (
   VOID\r
   );\r
 \r
-\r
 /**\r
   Returns TRUE if DEBUG_CODE() macros are enabled.\r
 \r
@@ -283,7 +276,6 @@ DebugCodeEnabled (
   VOID\r
   );\r
 \r
-\r
 /**\r
   Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled.\r
 \r
@@ -312,7 +304,7 @@ DebugClearMemoryEnabled (
 BOOLEAN\r
 EFIAPI\r
 DebugPrintLevelEnabled (\r
-  IN  CONST UINTN        ErrorLevel\r
+  IN  CONST UINTN  ErrorLevel\r
   );\r
 \r
 /**\r
@@ -325,6 +317,7 @@ DebugPrintLevelEnabled (
 \r
 **/\r
 #if defined (EDKII_UNIT_TEST_FRAMEWORK_ENABLED)\r
+\r
 /**\r
   Unit test library replacement for DebugAssert() in DebugLib.\r
 \r
@@ -344,17 +337,17 @@ UnitTestDebugAssert (
   IN CONST CHAR8  *Description\r
   );\r
 \r
-#if defined(__clang__) && defined(__FILE_NAME__)\r
+  #if defined (__clang__) && defined (__FILE_NAME__)\r
 #define _ASSERT(Expression)  UnitTestDebugAssert (__FILE_NAME__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression))\r
-#else\r
+  #else\r
 #define _ASSERT(Expression)  UnitTestDebugAssert (__FILE__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression))\r
-#endif\r
+  #endif\r
 #else\r
-#if defined(__clang__) && defined(__FILE_NAME__)\r
+  #if defined (__clang__) && defined (__FILE_NAME__)\r
 #define _ASSERT(Expression)  DebugAssert (__FILE_NAME__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression))\r
-#else\r
+  #else\r
 #define _ASSERT(Expression)  DebugAssert (__FILE__, DEBUG_LINE_NUMBER, DEBUG_EXPRESSION_STRING (Expression))\r
-#endif\r
+  #endif\r
 #endif\r
 \r
 /**\r
@@ -370,16 +363,16 @@ UnitTestDebugAssert (
 \r
 **/\r
 \r
-#if !defined(MDE_CPU_EBC) && (!defined (_MSC_VER) || _MSC_VER > 1400)\r
-  #define _DEBUG_PRINT(PrintLevel, ...)              \\r
+#if !defined (MDE_CPU_EBC) && (!defined (_MSC_VER) || _MSC_VER > 1400)\r
+#define _DEBUG_PRINT(PrintLevel, ...)              \\r
     do {                                             \\r
       if (DebugPrintLevelEnabled (PrintLevel)) {     \\r
         DebugPrint (PrintLevel, ##__VA_ARGS__);      \\r
       }                                              \\r
     } while (FALSE)\r
-  #define _DEBUG(Expression)   _DEBUG_PRINT Expression\r
+#define _DEBUG(Expression)  _DEBUG_PRINT Expression\r
 #else\r
-#define _DEBUG(Expression)   DebugPrint Expression\r
+#define _DEBUG(Expression)  DebugPrint Expression\r
 #endif\r
 \r
 /**\r
@@ -394,8 +387,8 @@ UnitTestDebugAssert (
   @param  Expression  Boolean expression.\r
 \r
 **/\r
-#if !defined(MDEPKG_NDEBUG)\r
-  #define ASSERT(Expression)        \\r
+#if !defined (MDEPKG_NDEBUG)\r
+#define ASSERT(Expression)        \\r
     do {                            \\r
       if (DebugAssertEnabled ()) {  \\r
         if (!(Expression)) {        \\r
@@ -405,7 +398,7 @@ UnitTestDebugAssert (
       }                             \\r
     } while (FALSE)\r
 #else\r
-  #define ASSERT(Expression)\r
+#define ASSERT(Expression)\r
 #endif\r
 \r
 /**\r
@@ -420,15 +413,15 @@ UnitTestDebugAssert (
 \r
 \r
 **/\r
-#if !defined(MDEPKG_NDEBUG)\r
-  #define DEBUG(Expression)        \\r
+#if !defined (MDEPKG_NDEBUG)\r
+#define DEBUG(Expression)        \\r
     do {                           \\r
       if (DebugPrintEnabled ()) {  \\r
         _DEBUG (Expression);       \\r
       }                            \\r
     } while (FALSE)\r
 #else\r
-  #define DEBUG(Expression)\r
+#define DEBUG(Expression)\r
 #endif\r
 \r
 /**\r
@@ -443,8 +436,8 @@ UnitTestDebugAssert (
   @param  StatusParameter  EFI_STATUS value to evaluate.\r
 \r
 **/\r
-#if !defined(MDEPKG_NDEBUG)\r
-  #define ASSERT_EFI_ERROR(StatusParameter)                                              \\r
+#if !defined (MDEPKG_NDEBUG)\r
+#define ASSERT_EFI_ERROR(StatusParameter)                                              \\r
     do {                                                                                 \\r
       if (DebugAssertEnabled ()) {                                                       \\r
         if (EFI_ERROR (StatusParameter)) {                                               \\r
@@ -454,7 +447,7 @@ UnitTestDebugAssert (
       }                                                                                  \\r
     } while (FALSE)\r
 #else\r
-  #define ASSERT_EFI_ERROR(StatusParameter)\r
+#define ASSERT_EFI_ERROR(StatusParameter)\r
 #endif\r
 \r
 /**\r
@@ -469,8 +462,8 @@ UnitTestDebugAssert (
   @param  StatusParameter  RETURN_STATUS value to evaluate.\r
 \r
 **/\r
-#if !defined(MDEPKG_NDEBUG)\r
-  #define ASSERT_RETURN_ERROR(StatusParameter)                          \\r
+#if !defined (MDEPKG_NDEBUG)\r
+#define ASSERT_RETURN_ERROR(StatusParameter)                          \\r
     do {                                                                \\r
       if (DebugAssertEnabled ()) {                                      \\r
         if (RETURN_ERROR (StatusParameter)) {                           \\r
@@ -481,7 +474,7 @@ UnitTestDebugAssert (
       }                                                                 \\r
     } while (FALSE)\r
 #else\r
-  #define ASSERT_RETURN_ERROR(StatusParameter)\r
+#define ASSERT_RETURN_ERROR(StatusParameter)\r
 #endif\r
 \r
 /**\r
@@ -506,8 +499,8 @@ UnitTestDebugAssert (
   @param  Guid    The pointer to a protocol GUID.\r
 \r
 **/\r
-#if !defined(MDEPKG_NDEBUG)\r
-  #define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid)                               \\r
+#if !defined (MDEPKG_NDEBUG)\r
+#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid)                               \\r
     do {                                                                                \\r
       if (DebugAssertEnabled ()) {                                                      \\r
         VOID  *Instance;                                                                \\r
@@ -524,7 +517,7 @@ UnitTestDebugAssert (
       }                                                                                 \\r
     } while (FALSE)\r
 #else\r
-  #define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid)\r
+#define ASSERT_PROTOCOL_ALREADY_INSTALLED(Handle, Guid)\r
 #endif\r
 \r
 /**\r
@@ -538,7 +531,6 @@ UnitTestDebugAssert (
 **/\r
 #define DEBUG_CODE_BEGIN()  do { if (DebugCodeEnabled ()) { UINT8  __DebugCodeLocal\r
 \r
-\r
 /**\r
   The macro that marks the end of debug source code.\r
 \r
@@ -548,8 +540,7 @@ UnitTestDebugAssert (
   are not included in a module.\r
 \r
 **/\r
-#define DEBUG_CODE_END()    __DebugCodeLocal = 0; __DebugCodeLocal++; } } while (FALSE)\r
-\r
+#define DEBUG_CODE_END()  __DebugCodeLocal = 0; __DebugCodeLocal++; } } while (FALSE)\r
 \r
 /**\r
   The macro that declares a section of debug source code.\r
@@ -564,7 +555,6 @@ UnitTestDebugAssert (
   Expression                    \\r
   DEBUG_CODE_END ()\r
 \r
-\r
 /**\r
   The macro that calls DebugClearMemory() to clear a buffer to a default value.\r
 \r
@@ -582,7 +572,6 @@ UnitTestDebugAssert (
     }                                        \\r
   } while (FALSE)\r
 \r
-\r
 /**\r
   Macro that calls DebugAssert() if the containing record does not have a\r
   matching signature.  If the signatures matches, then a pointer to the data\r
@@ -625,13 +614,13 @@ UnitTestDebugAssert (
   @param  TestSignature  The 32-bit signature value to match.\r
 \r
 **/\r
-#if !defined(MDEPKG_NDEBUG)\r
-  #define CR(Record, TYPE, Field, TestSignature)                                              \\r
+#if !defined (MDEPKG_NDEBUG)\r
+#define CR(Record, TYPE, Field, TestSignature)                                              \\r
     (DebugAssertEnabled () && (BASE_CR (Record, TYPE, Field)->Signature != TestSignature)) ?  \\r
     (TYPE *) (_ASSERT (CR has Bad Signature), Record) :                                       \\r
     BASE_CR (Record, TYPE, Field)\r
 #else\r
-  #define CR(Record, TYPE, Field, TestSignature)                                              \\r
+#define CR(Record, TYPE, Field, TestSignature)                                              \\r
     BASE_CR (Record, TYPE, Field)\r
 #endif\r
 \r