]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.c
ArmPkg: Apply uncrustify changes
[mirror_edk2.git] / ArmPkg / Library / RvdPeCoffExtraActionLib / RvdPeCoffExtraActionLib.c
index 5fe9b25f1f6479e3b41f0cec5595d0522abea7e4..6539c01763b516912b168f5a8a603cf34b7cabd4 100644 (file)
@@ -21,7 +21,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 /**\r
   Append string to debugger script file, create file if needed.\r
 \r
-  This library can show up in mulitple places so we need to append the file every time we write to it.\r
+  This library can show up in multiple places so we need to append the file every time we write to it.\r
   For example Sec can use this to load the DXE core, and the DXE core would use this to load all the\r
   other modules. So we have two instances of the library in the system.\r
 \r
@@ -39,18 +39,18 @@ WriteStringToFile (
   // This gets you all the symbols except for SEC. To get SEC symbols you need to copy the\r
   // debug print in the SEC into the debugger manually\r
   SemihostWriteString (Buffer);\r
-/*\r
-  I'm currently having issues with this code crashing the debugger. Seems like it should work.\r
 \r
-  UINT32        SemihostHandle;\r
-  UINT32        SemihostMode = SEMIHOST_FILE_MODE_WRITE | SEMIHOST_FILE_MODE_BINARY | SEMIHOST_FILE_MODE_UPDATE;\r
+  /*\r
+    I'm currently having issues with this code crashing the debugger. Seems like it should work.\r
 \r
-  SemihostFileOpen ("c:\rvi_symbols.inc", SemihostMode, &SemihostHandle);\r
-  SemihostFileWrite (SemihostHandle, &Length, Buffer);\r
-  SemihostFileClose (SemihostHandle);\r
- */\r
-}\r
+    UINT32        SemihostHandle;\r
+    UINT32        SemihostMode = SEMIHOST_FILE_MODE_WRITE | SEMIHOST_FILE_MODE_BINARY | SEMIHOST_FILE_MODE_UPDATE;\r
 \r
+    SemihostFileOpen ("c:\rvi_symbols.inc", SemihostMode, &SemihostHandle);\r
+    SemihostFileWrite (SemihostHandle, &Length, Buffer);\r
+    SemihostFileClose (SemihostHandle);\r
+   */\r
+}\r
 \r
 /**\r
   If the build is done on cygwin the paths are cygpaths.\r
@@ -62,12 +62,12 @@ WriteStringToFile (
 **/\r
 CHAR8 *\r
 DeCygwinPathIfNeeded (\r
-  IN  CHAR8   *Name\r
+  IN  CHAR8  *Name\r
   )\r
 {\r
-  CHAR8   *Ptr;\r
-  UINTN   Index;\r
-  UINTN   Len;\r
+  CHAR8  *Ptr;\r
+  UINTN  Index;\r
+  UINTN  Len;\r
 \r
   Ptr = AsciiStrStr (Name, "/cygdrive/");\r
   if (Ptr == NULL) {\r
@@ -88,14 +88,13 @@ DeCygwinPathIfNeeded (
   // switch path separators\r
   for (Index = 11; Index < Len; Index++) {\r
     if (Ptr[Index] == '/') {\r
-      Ptr[Index] = '\\' ;\r
+      Ptr[Index] = '\\';\r
     }\r
   }\r
 \r
   return Name;\r
 }\r
 \r
-\r
 /**\r
   Performs additional actions after a PE/COFF image has been loaded and relocated.\r
 \r
@@ -111,20 +110,18 @@ PeCoffLoaderRelocateImageExtraAction (
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
   )\r
 {\r
-  CHAR8 Buffer[256];\r
+  CHAR8  Buffer[256];\r
 \r
-#if (__ARMCC_VERSION < 500000)\r
-  AsciiSPrint (Buffer, sizeof(Buffer), "load /a /ni /np \"%a\" &0x%08x\n", ImageContext->PdbPointer, (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders));\r
-#else\r
-  AsciiSPrint (Buffer, sizeof(Buffer), "add-symbol-file %a 0x%08x\n", ImageContext->PdbPointer, (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders));\r
-#endif\r
+ #if (__ARMCC_VERSION < 500000)\r
+  AsciiSPrint (Buffer, sizeof (Buffer), "load /a /ni /np \"%a\" &0x%08x\n", ImageContext->PdbPointer, (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders));\r
+ #else\r
+  AsciiSPrint (Buffer, sizeof (Buffer), "add-symbol-file %a 0x%08x\n", ImageContext->PdbPointer, (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders));\r
+ #endif\r
   DeCygwinPathIfNeeded (&Buffer[16]);\r
 \r
   WriteStringToFile (Buffer, AsciiStrSize (Buffer));\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
@@ -141,9 +138,9 @@ PeCoffLoaderUnloadImageExtraAction (
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
   )\r
 {\r
-  CHAR8 Buffer[256];\r
+  CHAR8  Buffer[256];\r
 \r
-  AsciiSPrint (Buffer, sizeof(Buffer), "unload symbols_only \"%a\"\n", ImageContext->PdbPointer);\r
+  AsciiSPrint (Buffer, sizeof (Buffer), "unload symbols_only \"%a\"\n", ImageContext->PdbPointer);\r
   DeCygwinPathIfNeeded (Buffer);\r
 \r
   WriteStringToFile (Buffer, AsciiStrSize (Buffer));\r