From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id EC4FF21A134BB for ; Mon, 22 May 2017 23:43:04 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2017 23:43:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,381,1491289200"; d="scan'208";a="265240198" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 22 May 2017 23:43:04 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 22 May 2017 23:43:03 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 22 May 2017 23:43:03 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.193]) with mapi id 14.03.0319.002; Tue, 23 May 2017 14:43:01 +0800 From: "Yao, Jiewen" To: "Zeng, Star" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] MdeModulePkg MemoryProfileInfo: Use PdbStringOffset to get PDB info Thread-Index: AQHS042hjlZUMUIC7kW1fpzPCME9qKIBeIBQ Date: Tue, 23 May 2017 06:43:01 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A953F41@shsmsx102.ccr.corp.intel.com> References: <1495520834-45256-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1495520834-45256-1-git-send-email-star.zeng@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg MemoryProfileInfo: Use PdbStringOffset to get PDB info X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 May 2017 06:43:05 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiewen.yao@intel.com > -----Original Message----- > From: Zeng, Star > Sent: Tuesday, May 23, 2017 2:27 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Yao, Jiewen > Subject: [PATCH] MdeModulePkg MemoryProfileInfo: Use PdbStringOffset to > get PDB info >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D570 > Use PdbStringOffset to get PDB info, it will have no functional impact, > and will just make the code more generic. >=20 > Cc: Jiewen Yao > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Star Zeng > --- > MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c | 6 > +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git > a/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c > b/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c > index 338eb8191fa2..072ae72dcd76 100644 > --- a/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c > +++ b/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.c > @@ -1,6 +1,6 @@ > /** @file >=20 > - Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
> + Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
> 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 !=3D 0) { > + GetShortPdbFileName ((CHAR8 *) ((UINTN) DriverInfo + > DriverInfo->PdbStringOffset), mNameString); > return mNameString; > } >=20 > -- > 2.7.0.windows.1