]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg: DebugPeCoffExtraActionLib: debugger commands are not errors
authorPhilippe Mathieu-Daude <philmd@redhat.com>
Mon, 29 Jul 2019 18:03:20 +0000 (20:03 +0200)
committerLeif Lindholm <leif.lindholm@linaro.org>
Tue, 30 Jul 2019 13:57:51 +0000 (14:57 +0100)
In commit 1fce963d89f3e we reduced the level of information printed
by PeCoffLoaderRelocateImageExtraAction() but we did not update the
similar PeCoffLoaderUnloadImageExtraAction() function.

PeCoffLoaderUnloadImageExtraAction() prints helpful debugger commands
for source level debugging. These messages should not be printed on the
EFI_D_ERROR level; they don't report errors. Change the debug level
(bitmask, actually) to DEBUG_LOAD | DEBUG_INFO, because the messages are
printed in relation to image loading, and they are informative.

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reported-by: Andrew Jones <drjones@redhat.com>
Suggested-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c

index a1cb99677fe67dcff4b5ca9cf3dc100eb41bb6f5..3379744aa185fa8fc882e520ce66e54cb51f8297 100644 (file)
@@ -122,14 +122,14 @@ PeCoffLoaderUnloadImageExtraAction (
   if (ImageContext->PdbPointer) {\r
 #ifdef __CC_ARM\r
     // Print out the command for the RVD debugger to load symbols for this image\r
-    DEBUG ((EFI_D_ERROR, "unload symbols_only %a\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp))));\r
+    DEBUG ((DEBUG_LOAD | DEBUG_INFO, "unload symbols_only %a\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp))));\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, "remove-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
+    DEBUG ((DEBUG_LOAD | DEBUG_INFO, "remove-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
 #else\r
-    DEBUG ((EFI_D_ERROR, "Unloading %a\n", ImageContext->PdbPointer));\r
+    DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Unloading %a\n", ImageContext->PdbPointer));\r
 #endif\r
   } else {\r
-    DEBUG ((EFI_D_ERROR, "Unloading driver at 0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress));\r
+    DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Unloading driver at 0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress));\r
   }\r
 }\r