MdeModulePkg MemoryProfileInfo: Use PdbStringOffset to get PDB info

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=570
Use PdbStringOffset to get PDB info, it will have no functional impact,
and will just make the code more generic.

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:
Star Zeng 2016-10-09 15:48:02 +08:00
parent f248539538
commit a0284a9a58
1 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
/** @file
Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@ -249,8 +249,8 @@ GetDriverNameString (
//
// Method 1: Get the name string from image PDB
//
if (DriverInfo->Header.Length > sizeof (MEMORY_PROFILE_DRIVER_INFO)) {
GetShortPdbFileName ((CHAR8 *) (DriverInfo + 1), mNameString);
if (DriverInfo->PdbStringOffset != 0) {
GetShortPdbFileName ((CHAR8 *) ((UINTN) DriverInfo + DriverInfo->PdbStringOffset), mNameString);
return mNameString;
}