]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.c
ArmPkg/PeCoffExtraActionLib: Enabled DS-5 command line when using ARM Toolchain v5
[mirror_edk2.git] / ArmPkg / Library / RvdPeCoffExtraActionLib / RvdPeCoffExtraActionLib.c
index 071c510ddeb643a9234f01a487090b515e172f50..d55608b45b1330aa72e6b49a2166087ec1ac122d 100644 (file)
@@ -1,8 +1,10 @@
 /**@file\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation\r
-Portions copyright (c) 2008-2010 Apple Inc. All rights reserved.\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
+Portions copyright (c) 2011 - 2012, ARM Ltd. All rights reserved.<BR>\r
+\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -89,7 +91,7 @@ DeCygwinPathIfNeeded (
   Ptr[9]  = Ptr[10];\r
   Ptr[10] = ':';\r
   \r
-  // switch path seperators\r
+  // switch path separators\r
   for (Index = 11; Index < Len; Index++) {\r
     if (Ptr[Index] == '/') {\r
       Ptr[Index] = '\\' ;\r
@@ -117,7 +119,11 @@ PeCoffLoaderRelocateImageExtraAction (
 {\r
   CHAR8 Buffer[256];\r
   \r
-  AsciiSPrint (Buffer, sizeof(Buffer), "load /a /ni /np %a &0x%08x\n", ImageContext->PdbPointer, (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders));\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
@@ -143,7 +149,7 @@ PeCoffLoaderUnloadImageExtraAction (
 {\r
   CHAR8 Buffer[256];\r
   \r
-  AsciiSPrint (Buffer, sizeof(Buffer), "unload symbols_only %a", ImageContext->PdbPointer);\r
+  AsciiSPrint (Buffer, sizeof(Buffer), "unload symbols_only \"%a\"\n", ImageContext->PdbPointer);\r
   DeCygwinPathIfNeeded (Buffer);\r
  \r
   WriteStringToFile (Buffer, AsciiStrSize (Buffer));\r