]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg: Remove RealView Debugger support
authorRebecca Cran <rebecca@bsdio.com>
Fri, 27 Jan 2023 16:42:50 +0000 (09:42 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 30 Jan 2023 16:50:14 +0000 (16:50 +0000)
The RealView Debugger is related to RVCT, which is no longer supported.
Given that, remove RvdPeCoffExtraActionLib and code from
RvdPeCoffExtraActionLib which prints lines for use with the RealView
Debugger.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Acked-by: Bob Feng <bob.c.feng@intel.com>
ArmPkg/ArmPkg.dsc
ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c
ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.c [deleted file]
ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.inf [deleted file]

index 1e873b90c56d3c384aedac89cd806a85a0671df1..3fb95d1951a9fd335de08636510349e0f9491cd8 100644 (file)
   ArmPkg/Library/DebugAgentSymbolsBaseLib/DebugAgentSymbolsBaseLib.inf\r
   ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.inf\r
   ArmPkg/Library/DefaultExceptionHandlerLib/DefaultExceptionHandlerLib.inf\r
-  ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.inf\r
   ArmPkg/Library/SemiHostingDebugLib/SemiHostingDebugLib.inf\r
   ArmPkg/Library/SemiHostingSerialPortLib/SemiHostingSerialPortLib.inf\r
   ArmPkg/Library/SemihostLib/SemihostLib.inf\r
index 3827122a969619ed2cec1e74f279dcb5ec2199d1..432112354fda18f94ab31e307ab4ed9cbc1fd14f 100644 (file)
@@ -77,13 +77,8 @@ PeCoffLoaderRelocateImageExtraAction (
 \r
   if (ImageContext->PdbPointer) {\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
     // 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
     // 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
diff --git a/ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.c b/ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.c
deleted file mode 100644 (file)
index 6539c01..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/**@file\r
-\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
-SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#include <PiDxe.h>\r
-#include <Library/PeCoffLib.h>\r
-\r
-#include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/PeCoffExtraActionLib.h>\r
-#include <Library/SemihostLib.h>\r
-#include <Library/PrintLib.h>\r
-\r
-/**\r
-  Append string to debugger script file, create file if needed.\r
-\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
-  @param  Buffer  Buffer to write to file.\r
-  @param  Length  Length of Buffer in bytes.\r
-**/\r
-VOID\r
-WriteStringToFile (\r
-  IN  VOID    *Buffer,\r
-  IN  UINT32  Length\r
-  )\r
-{\r
-  // Working around and issue with the code that is commented out. For now send it to the console.\r
-  // You can copy the console into a file and source the file as a script and you get symbols.\r
-  // 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
-  /*\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
-    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
-  /cygdrive/c/tmp.txt vs c:\tmp.txt so we need to convert\r
-  them to work with RVD commands\r
-\r
-  @param  Name  Path to convert if needed\r
-\r
-**/\r
-CHAR8 *\r
-DeCygwinPathIfNeeded (\r
-  IN  CHAR8  *Name\r
-  )\r
-{\r
-  CHAR8  *Ptr;\r
-  UINTN  Index;\r
-  UINTN  Len;\r
-\r
-  Ptr = AsciiStrStr (Name, "/cygdrive/");\r
-  if (Ptr == NULL) {\r
-    return Name;\r
-  }\r
-\r
-  Len = AsciiStrLen (Ptr);\r
-\r
-  // convert "/cygdrive" to spaces\r
-  for (Index = 0; Index < 9; Index++) {\r
-    Ptr[Index] = ' ';\r
-  }\r
-\r
-  // convert /c to c:\r
-  Ptr[9]  = Ptr[10];\r
-  Ptr[10] = ':';\r
-\r
-  // switch path separators\r
-  for (Index = 11; Index < Len; Index++) {\r
-    if (Ptr[Index] == '/') {\r
-      Ptr[Index] = '\\';\r
-    }\r
-  }\r
-\r
-  return Name;\r
-}\r
-\r
-/**\r
-  Performs additional actions after a PE/COFF image has been loaded and relocated.\r
-\r
-  If ImageContext is NULL, then ASSERT().\r
-\r
-  @param  ImageContext  Pointer to the image context structure that describes the\r
-                        PE/COFF image that has already been loaded and relocated.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-PeCoffLoaderRelocateImageExtraAction (\r
-  IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
-  )\r
-{\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
-  DeCygwinPathIfNeeded (&Buffer[16]);\r
-\r
-  WriteStringToFile (Buffer, AsciiStrSize (Buffer));\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
-\r
-  If ImageContext is NULL, then ASSERT().\r
-\r
-  @param  ImageContext  Pointer to the image context structure that describes the\r
-                        PE/COFF image that is being unloaded.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-PeCoffLoaderUnloadImageExtraAction (\r
-  IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
-  )\r
-{\r
-  CHAR8  Buffer[256];\r
-\r
-  AsciiSPrint (Buffer, sizeof (Buffer), "unload symbols_only \"%a\"\n", ImageContext->PdbPointer);\r
-  DeCygwinPathIfNeeded (Buffer);\r
-\r
-  WriteStringToFile (Buffer, AsciiStrSize (Buffer));\r
-}\r
diff --git a/ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.inf b/ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.inf
deleted file mode 100644 (file)
index 6b7ac87..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#/** @file\r
-# PeCoff extra action library for DXE phase that run Unix emulator.\r
-#\r
-# Lib to provide memory journal status code reporting Routines\r
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
-# Portions copyright (c) 2010, Apple Inc. All rights reserved.<BR>\r
-# SPDX-License-Identifier: BSD-2-Clause-Patent\r
-#\r
-#\r
-#**/\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = RvdUnixPeCoffExtraActionLib\r
-  FILE_GUID                      = 5EDEB7E7-EA55-4E92-8216-335AC98A3B11\r
-  MODULE_TYPE                    = BASE\r
-  VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = PeCoffExtraActionLib\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = ARM\r
-#\r
-\r
-[Sources.common]\r
-  RvdPeCoffExtraActionLib.c\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-  ArmPkg/ArmPkg.dec\r
-\r
-[LibraryClasses]\r
-  DebugLib\r
-  SemihostLib\r