]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c
ArmPkg/PeCoffExtraActionLib: Enabled DS-5 command line when using ARM Toolchain v5
[mirror_edk2.git] / ArmPkg / Library / DebugPeCoffExtraActionLib / DebugPeCoffExtraActionLib.c
index 4b95bdf54c5df303383e665d9e09f66d1196df36..6459d51cffc0b4af3b9b1dc9d99bd04a4213419c 100755 (executable)
@@ -2,6 +2,8 @@
 \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
@@ -77,11 +79,18 @@ PeCoffLoaderRelocateImageExtraAction (
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
   )\r
 {\r
-    CHAR8 Temp[512];\r
+#if !defined(MDEPKG_NDEBUG) \r
+  CHAR8 Temp[512];\r
+#endif\r
 \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 ((EFI_D_ERROR, "load /a /ni /np %a &0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
+#else\r
+  // Print out the command for the DS-5 to load symbols for this image\r
+  DEBUG ((EFI_D_ERROR, "add-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
+#endif\r
 #elif __GNUC__\r
   // This may not work correctly if you generate PE/COFF directlyas then the Offset would not be required\r
   DEBUG ((EFI_D_ERROR, "add-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
@@ -108,7 +117,9 @@ PeCoffLoaderUnloadImageExtraAction (
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
   )\r
 {\r
+#if !defined(MDEPKG_NDEBUG)\r
   CHAR8 Temp[512];\r
+#endif\r
   \r
 #ifdef __CC_ARM\r
   {  \r