mirror of https://github.com/acidanthera/audk.git
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:
parent
f248539538
commit
a0284a9a58
|
@ -1,6 +1,6 @@
|
||||||
/** @file
|
/** @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
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
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
|
// Method 1: Get the name string from image PDB
|
||||||
//
|
//
|
||||||
if (DriverInfo->Header.Length > sizeof (MEMORY_PROFILE_DRIVER_INFO)) {
|
if (DriverInfo->PdbStringOffset != 0) {
|
||||||
GetShortPdbFileName ((CHAR8 *) (DriverInfo + 1), mNameString);
|
GetShortPdbFileName ((CHAR8 *) ((UINTN) DriverInfo + DriverInfo->PdbStringOffset), mNameString);
|
||||||
return mNameString;
|
return mNameString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue