From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Tue, 30 Jul 2019 06:25:37 -0700 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AA095309264D; Tue, 30 Jul 2019 13:25:36 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (unknown [10.36.118.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3491660856; Tue, 30 Jul 2019 13:25:33 +0000 (UTC) Subject: Re: [PATCH 1/2] ArmPkg: DebugPeCoffExtraActionLib: debugger commands are not errors To: Philippe Mathieu-Daude , devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Andrew Jones References: <20190729180321.1715-1-philmd@redhat.com> <20190729180321.1715-2-philmd@redhat.com> From: "Laszlo Ersek" Message-ID: <18e6c261-722e-3ab6-3632-cdcca8b4a2f6@redhat.com> Date: Tue, 30 Jul 2019 15:25:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190729180321.1715-2-philmd@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 30 Jul 2019 13:25:36 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 07/29/19 20:03, Philippe Mathieu-Daude wrote: > 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 > Cc: Ard Biesheuvel > Reported-by: Andrew Jones > Suggested-by: Laszlo Ersek > Signed-off-by: Philippe Mathieu-Daude > --- > .../DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c b/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c > index a1cb99677fe6..3379744aa185 100644 > --- a/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c > +++ b/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c > @@ -122,14 +122,14 @@ PeCoffLoaderUnloadImageExtraAction ( > if (ImageContext->PdbPointer) { > #ifdef __CC_ARM > // Print out the command for the RVD debugger to load symbols for this image > - DEBUG ((EFI_D_ERROR, "unload symbols_only %a\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)))); > + DEBUG ((DEBUG_LOAD | DEBUG_INFO, "unload symbols_only %a\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)))); > #elif __GNUC__ > // This may not work correctly if you generate PE/COFF directlyas then the Offset would not be required > - DEBUG ((EFI_D_ERROR, "remove-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders))); > + DEBUG ((DEBUG_LOAD | DEBUG_INFO, "remove-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders))); > #else > - DEBUG ((EFI_D_ERROR, "Unloading %a\n", ImageContext->PdbPointer)); > + DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Unloading %a\n", ImageContext->PdbPointer)); > #endif > } else { > - DEBUG ((EFI_D_ERROR, "Unloading driver at 0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress)); > + DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Unloading driver at 0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress)); > } > } > Reviewed-by: Laszlo Ersek