Blame SOURCES/edk2-ArmPkg-DebugPeCoffExtraActionLib-debugger-commands-a.patch

fcd20d
From 11a1c8085b0edccd3a304f704f47ec5d8ee6255d Mon Sep 17 00:00:00 2001
fcd20d
From: Philippe Mathieu-Daude <philmd@redhat.com>
fcd20d
Date: Thu, 1 Aug 2019 20:43:49 +0200
fcd20d
Subject: [PATCH 3/3] ArmPkg: DebugPeCoffExtraActionLib: debugger commands are
fcd20d
 not errors
fcd20d
fcd20d
Message-id: <20190801184349.28512-4-philmd@redhat.com>
fcd20d
Patchwork-id: 89860
fcd20d
O-Subject:  [RHEL-8.1.0 edk2 PATCH v4 3/3] ArmPkg: DebugPeCoffExtraActionLib:
fcd20d
	debugger commands are not errors
fcd20d
Bugzilla: 1714446
fcd20d
Acked-by: Andrew Jones <drjones@redhat.com>
fcd20d
Acked-by: Laszlo Ersek <lersek@redhat.com>
fcd20d
fcd20d
In commit 1fce963d89f3e we reduced the level of information printed
fcd20d
by PeCoffLoaderRelocateImageExtraAction() but we did not update the
fcd20d
similar PeCoffLoaderUnloadImageExtraAction() function.
fcd20d
fcd20d
PeCoffLoaderUnloadImageExtraAction() prints helpful debugger commands
fcd20d
for source level debugging. These messages should not be printed on the
fcd20d
EFI_D_ERROR level; they don't report errors. Change the debug level
fcd20d
(bitmask, actually) to DEBUG_LOAD | DEBUG_INFO, because the messages are
fcd20d
printed in relation to image loading, and they are informative.
fcd20d
fcd20d
Cc: Leif Lindholm <leif.lindholm@linaro.org>
fcd20d
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
fcd20d
Reported-by: Andrew Jones <drjones@redhat.com>
fcd20d
Suggested-by: Laszlo Ersek <lersek@redhat.com>
fcd20d
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
fcd20d
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
fcd20d
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
fcd20d
(cherry picked from commit a6cd7fbac494ed3b2386db1f2a8b1a73f399e940)
fcd20d
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
fcd20d
---
fcd20d
 .../Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c | 8 ++++----
fcd20d
 1 file changed, 4 insertions(+), 4 deletions(-)
fcd20d
fcd20d
diff --git a/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c b/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c
fcd20d
index f298e58..895198f 100644
fcd20d
--- a/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c
fcd20d
+++ b/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c
fcd20d
@@ -128,14 +128,14 @@ PeCoffLoaderUnloadImageExtraAction (
fcd20d
   if (ImageContext->PdbPointer) {
fcd20d
 #ifdef __CC_ARM
fcd20d
     // Print out the command for the RVD debugger to load symbols for this image
fcd20d
-    DEBUG ((EFI_D_ERROR, "unload symbols_only %a\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp))));
fcd20d
+    DEBUG ((DEBUG_LOAD | DEBUG_INFO, "unload symbols_only %a\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp))));
fcd20d
 #elif __GNUC__
fcd20d
     // This may not work correctly if you generate PE/COFF directlyas then the Offset would not be required
fcd20d
-    DEBUG ((EFI_D_ERROR, "remove-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));
fcd20d
+    DEBUG ((DEBUG_LOAD | DEBUG_INFO, "remove-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));
fcd20d
 #else
fcd20d
-    DEBUG ((EFI_D_ERROR, "Unloading %a\n", ImageContext->PdbPointer));
fcd20d
+    DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Unloading %a\n", ImageContext->PdbPointer));
fcd20d
 #endif
fcd20d
   } else {
fcd20d
-    DEBUG ((EFI_D_ERROR, "Unloading driver at 0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress));
fcd20d
+    DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Unloading driver at 0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress));
fcd20d
   }
fcd20d
 }
fcd20d
-- 
fcd20d
1.8.3.1
fcd20d