]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg MemoryProfileInfo: Use PdbStringOffset to get PDB info
authorStar Zeng <star.zeng@intel.com>
Sun, 9 Oct 2016 07:48:02 +0000 (15:48 +0800)
committerStar Zeng <star.zeng@intel.com>
Wed, 24 May 2017 07:27:35 +0000 (15:27 +0800)
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>
MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c

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