MdeModulePkg SmiHandlerProfile: Fix no PDB case handling incorrectly
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=569 The PdbStringOffset should be set to 0 for no PDB case, then SmiHandlerProfileInfo can use it to know whether there is PCD info or not. Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
@@ -266,8 +266,8 @@ GetDriverNameString (
|
||||
//
|
||||
// Method 1: Get the name string from image PDB
|
||||
//
|
||||
if (ImageStruct->Header.Length > sizeof (SMM_CORE_IMAGE_DATABASE_STRUCTURE)) {
|
||||
GetShortPdbFileName ((CHAR8 *) (ImageStruct + 1), mNameString);
|
||||
if (ImageStruct->PdbStringOffset != 0) {
|
||||
GetShortPdbFileName ((CHAR8 *) ((UINTN) ImageStruct + ImageStruct->PdbStringOffset), mNameString);
|
||||
return mNameString;
|
||||
}
|
||||
|
||||
@@ -355,8 +355,10 @@ DumpSmmLoadedImage(
|
||||
Print(L" FvFile=\"%g\"", &ImageStruct->FileGuid);
|
||||
Print(L" RefId=\"0x%x\"", ImageStruct->ImageRef);
|
||||
Print(L">\n");
|
||||
PdbString = (CHAR8 *)((UINTN)ImageStruct + ImageStruct->PdbStringOffset);
|
||||
Print(L" <Pdb>%a</Pdb>\n", PdbString);
|
||||
if (ImageStruct->PdbStringOffset != 0) {
|
||||
PdbString = (CHAR8 *)((UINTN)ImageStruct + ImageStruct->PdbStringOffset);
|
||||
Print(L" <Pdb>%a</Pdb>\n", PdbString);
|
||||
}
|
||||
Print(L" </Image>\n");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user