From 4a02e8a8073ec6e17b700c45b1a457e5a6606973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marvin=20Ha=CC=88user?= <8659494+mhaeuser@users.noreply.github.com> Date: Sun, 30 Apr 2023 13:17:08 +0200 Subject: [PATCH] BaseUefiImageLib: Fix segment logging --- MdePkg/Library/BaseUefiImageLib/CommonSupport.c | 2 +- MdePkg/Library/BaseUefiImageLib/PeCoffSupport.c | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/MdePkg/Library/BaseUefiImageLib/CommonSupport.c b/MdePkg/Library/BaseUefiImageLib/CommonSupport.c index 5a53805ea4..ab814a3912 100644 --- a/MdePkg/Library/BaseUefiImageLib/CommonSupport.c +++ b/MdePkg/Library/BaseUefiImageLib/CommonSupport.c @@ -239,7 +239,7 @@ UefiImageDebugPrintImageRecord ( DEBUG (( DEBUG_VERBOSE, " RecordSegment\n" - " Address - 0x%16xll\n" + " Address - 0x%016llx\n" " Size - 0x%08x\n" " Attributes - 0x%08x\n", (UINT64) SegmentAddress, diff --git a/MdePkg/Library/BaseUefiImageLib/PeCoffSupport.c b/MdePkg/Library/BaseUefiImageLib/PeCoffSupport.c index f775ff34c3..66364288d7 100644 --- a/MdePkg/Library/BaseUefiImageLib/PeCoffSupport.c +++ b/MdePkg/Library/BaseUefiImageLib/PeCoffSupport.c @@ -480,21 +480,24 @@ UefiImageDebugPrintSegmentsPeCoff ( Name = Sections[SectionIndex].Name; DEBUG (( DEBUG_VERBOSE, - " Section - '%c%c%c%c%c%c%c%c'\n", + " Section - '%c%c%c%c%c%c%c%c'\n" " VirtualSize - 0x%08x\n" " VirtualAddress - 0x%08x\n" " SizeOfRawData - 0x%08x\n" - " PointerToRawData - 0x%08x\n" + " PointerToRawData - 0x%08x\n", + Name[0], Name[1], Name[2], Name[3], Name[4], Name[5], Name[6], Name[7], + Sections[SectionIndex].VirtualSize, + Sections[SectionIndex].VirtualAddress, + Sections[SectionIndex].SizeOfRawData, + Sections[SectionIndex].PointerToRawData + )); + DEBUG (( + DEBUG_VERBOSE, " PointerToRelocations - 0x%08x\n" " PointerToLinenumbers - 0x%08x\n" " NumberOfRelocations - 0x%08x\n" " NumberOfLinenumbers - 0x%08x\n" " Characteristics - 0x%08x\n", - Name[0], Name[1], Name[2], Name[3], Name[4], Name[5], Name[6], Name[7], - Sections[SectionIndex].VirtualSize, - Sections[SectionIndex].VirtualAddress, - Sections[SectionIndex].SizeOfRawData, - Sections[SectionIndex].PointerToRawData, Sections[SectionIndex].PointerToRelocations, Sections[SectionIndex].PointerToLinenumbers, Sections[SectionIndex].NumberOfRelocations,