diff options
author | Star Zeng <star.zeng@intel.com> | 2016-10-09 15:48:02 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2017-05-24 15:27:35 +0800 |
commit | a0284a9a5820e470bae2557a7e25c426e62c8a4e (patch) | |
tree | b7e30c9b4b3f206e1e6ab7a7fc037d25bbb8d681 /MdeModulePkg | |
parent | f248539538efd522a71c1e9bf63c622e02d443f4 (diff) | |
download | edk2-a0284a9a5820e470bae2557a7e25c426e62c8a4e.tar.gz edk2-a0284a9a5820e470bae2557a7e25c426e62c8a4e.tar.bz2 edk2-a0284a9a5820e470bae2557a7e25c426e62c8a4e.zip |
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>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c b/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c index 338eb8191f..072ae72dcd 100644 --- a/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c +++ b/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c @@ -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;
}
|