]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c
ArmPkg: Apply uncrustify changes
[mirror_edk2.git] / ArmPkg / Library / DebugPeCoffExtraActionLib / DebugPeCoffExtraActionLib.c
index 2e8afc051e2a840642b998b8f7428e8b50d31f7b..3827122a969619ed2cec1e74f279dcb5ec2199d1 100644 (file)
@@ -17,7 +17,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include <Library/PeCoffExtraActionLib.h>\r
 #include <Library/PrintLib.h>\r
 \r
-\r
 /**\r
   If the build is done on cygwin the paths are cygpaths.\r
   /cygdrive/c/tmp.txt vs c:\tmp.txt so we need to convert\r
@@ -28,14 +27,14 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 **/\r
 CHAR8 *\r
 DeCygwinPathIfNeeded (\r
-  IN  CHAR8   *Name,\r
-  IN  CHAR8   *Temp,\r
-  IN  UINTN   Size\r
+  IN  CHAR8  *Name,\r
+  IN  CHAR8  *Temp,\r
+  IN  UINTN  Size\r
   )\r
 {\r
-  CHAR8   *Ptr;\r
-  UINTN   Index;\r
-  UINTN   Index2;\r
+  CHAR8  *Ptr;\r
+  UINTN  Index;\r
+  UINTN  Index2;\r
 \r
   Ptr = AsciiStrStr (Name, "/cygdrive/");\r
   if (Ptr == NULL) {\r
@@ -45,19 +44,18 @@ DeCygwinPathIfNeeded (
   for (Index = 9, Index2 = 0; (Index < (Size + 9)) && (Ptr[Index] != '\0'); Index++, Index2++) {\r
     Temp[Index2] = Ptr[Index];\r
     if (Temp[Index2] == '/') {\r
-      Temp[Index2] = '\\' ;\r
-  }\r
+      Temp[Index2] = '\\';\r
+    }\r
 \r
     if (Index2 == 1) {\r
       Temp[Index2 - 1] = Ptr[Index];\r
-      Temp[Index2] = ':';\r
+      Temp[Index2]     = ':';\r
     }\r
   }\r
 \r
   return Temp;\r
 }\r
 \r
-\r
 /**\r
   Performs additional actions after a PE/COFF image has been loaded and relocated.\r
 \r
@@ -73,32 +71,30 @@ PeCoffLoaderRelocateImageExtraAction (
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
   )\r
 {\r
-#if !defined(MDEPKG_NDEBUG)\r
-  CHAR8 Temp[512];\r
-#endif\r
+ #if !defined (MDEPKG_NDEBUG)\r
+  CHAR8  Temp[512];\r
+ #endif\r
 \r
   if (ImageContext->PdbPointer) {\r
-#ifdef __CC_ARM\r
-#if (__ARMCC_VERSION < 500000)\r
+ #ifdef __CC_ARM\r
+ #if (__ARMCC_VERSION < 500000)\r
     // Print out the command for the RVD debugger to load symbols for this image\r
     DEBUG ((DEBUG_LOAD | DEBUG_INFO, "load /a /ni /np %a &0x%p\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
-#else\r
+ #else\r
     // Print out the command for the DS-5 to load symbols for this image\r
     DEBUG ((DEBUG_LOAD | DEBUG_INFO, "add-symbol-file %a 0x%p\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
-#endif\r
-#elif __GNUC__\r
+ #endif\r
+ #elif __GNUC__\r
     // This may not work correctly if you generate PE/COFF directly as then the Offset would not be required\r
     DEBUG ((DEBUG_LOAD | DEBUG_INFO, "add-symbol-file %a 0x%p\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
-#else\r
-    DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Loading driver at 0x%11p EntryPoint=0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress, FUNCTION_ENTRY_POINT (ImageContext->EntryPoint)));\r
-#endif\r
+ #else\r
+    DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Loading driver at 0x%11p EntryPoint=0x%11p\n", (VOID *)(UINTN)ImageContext->ImageAddress, FUNCTION_ENTRY_POINT (ImageContext->EntryPoint)));\r
+ #endif\r
   } else {\r
-    DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Loading driver at 0x%11p EntryPoint=0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress, FUNCTION_ENTRY_POINT (ImageContext->EntryPoint)));\r
+    DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Loading driver at 0x%11p EntryPoint=0x%11p\n", (VOID *)(UINTN)ImageContext->ImageAddress, FUNCTION_ENTRY_POINT (ImageContext->EntryPoint)));\r
   }\r
 }\r
 \r
-\r
-\r
 /**\r
   Performs additional actions just before a PE/COFF image is unloaded.  Any resources\r
   that were allocated by PeCoffLoaderRelocateImageExtraAction() must be freed.\r
@@ -115,21 +111,21 @@ PeCoffLoaderUnloadImageExtraAction (
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
   )\r
 {\r
-#if !defined(MDEPKG_NDEBUG)\r
-  CHAR8 Temp[512];\r
-#endif\r
+ #if !defined (MDEPKG_NDEBUG)\r
+  CHAR8  Temp[512];\r
+ #endif\r
 \r
   if (ImageContext->PdbPointer) {\r
-#ifdef __CC_ARM\r
+ #ifdef __CC_ARM\r
     // Print out the command for the RVD debugger to load symbols for this image\r
     DEBUG ((DEBUG_LOAD | DEBUG_INFO, "unload symbols_only %a\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp))));\r
-#elif __GNUC__\r
+ #elif __GNUC__\r
     // This may not work correctly if you generate PE/COFF directly as then the Offset would not be required\r
     DEBUG ((DEBUG_LOAD | DEBUG_INFO, "remove-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
-#else\r
+ #else\r
     DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Unloading %a\n", ImageContext->PdbPointer));\r
-#endif\r
+ #endif\r
   } else {\r
-    DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Unloading driver at 0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress));\r
+    DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Unloading driver at 0x%11p\n", (VOID *)(UINTN)ImageContext->ImageAddress));\r
   }\r
 }\r