From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 8F9152233376C for ; Mon, 22 Jan 2018 18:57:41 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2018 19:03:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,398,1511856000"; d="scan'208";a="21797637" Received: from shwdeopenpsi105.ccr.corp.intel.com ([10.239.9.129]) by FMSMGA003.fm.intel.com with ESMTP; 22 Jan 2018 19:03:07 -0800 From: BobCF To: edk2-devel@lists.01.org Cc: Bob Feng , Liming Gao Date: Tue, 23 Jan 2018 11:03:05 +0800 Message-Id: <20180123030305.10300-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.14.3.windows.1 Subject: [Patch] BaseTools: Add comments for the Structure Pcd definition in PcdValueInit.c file X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jan 2018 02:57:42 -0000 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao --- BaseTools/Source/Python/Workspace/BuildClassObject.py | 4 ++++ BaseTools/Source/Python/Workspace/DecBuildData.py | 2 ++ BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py b/BaseTools/Source/Python/Workspace/BuildClassObject.py index 0e3081cfc5..8d02e78b27 100644 --- a/BaseTools/Source/Python/Workspace/BuildClassObject.py +++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py @@ -117,10 +117,12 @@ class StructurePcd(PcdClassObject): self.DefaultValues = collections.OrderedDict({}) self.PcdMode = None self.SkuOverrideValues = collections.OrderedDict({}) self.FlexibleFieldName = None self.StructName = None + self.PcdDefineLineNo = 0 + self.PkgPath = "" def __repr__(self): return self.TypeName def AddDefaultValue (self, FieldName, Value, FileName="", LineNo=0): if FieldName in self.DefaultValues: @@ -169,10 +171,12 @@ class StructurePcd(PcdClassObject): self.PcdMode = PcdObject.PcdMode if PcdObject.PcdMode else self.PcdMode self.DefaultFromDSC=None self.SkuOverrideValues = PcdObject.SkuOverrideValues if PcdObject.SkuOverrideValues else self.SkuOverrideValues self.FlexibleFieldName = PcdObject.FlexibleFieldName if PcdObject.FlexibleFieldName else self.FlexibleFieldName self.StructName = PcdObject.DatumType if PcdObject.DatumType else self.StructName + self.PcdDefineLineNo = PcdObject.PcdDefineLineNo if PcdObject.PcdDefineLineNo else self.PcdDefineLineNo + self.PkgPath = PcdObject.PkgPath if PcdObject.PkgPath else self.PkgPath ## LibraryClassObject # # This Class defines LibraryClassObject used in BuildDatabase # diff --git a/BaseTools/Source/Python/Workspace/DecBuildData.py b/BaseTools/Source/Python/Workspace/DecBuildData.py index 13fb8686b6..2fd3820dcc 100644 --- a/BaseTools/Source/Python/Workspace/DecBuildData.py +++ b/BaseTools/Source/Python/Workspace/DecBuildData.py @@ -381,10 +381,12 @@ class DecBuildData(PackageBuildClassObject): dep_pkgs.append(item.DefaultValue) elif item.DatumType == item.TokenCName: struct_pcd.copy(item) struct_pcd.TokenValue = struct_pcd.TokenValue.strip("{").strip() struct_pcd.TokenSpaceGuidCName, struct_pcd.TokenCName = pcdname.split(".") + struct_pcd.PcdDefineLineNo = LineNo + struct_pcd.PkgPath = self.MetaFile.File else: struct_pcd.AddDefaultValue(item.TokenCName, item.DefaultValue,self.MetaFile.File,LineNo) struct_pcd.PackageDecs = dep_pkgs diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index b042c4306a..60aa4868ed 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1284,11 +1284,11 @@ class DscBuildData(PlatformBuildClassObject): CApp = CApp + ' UINT32 Size;\n' CApp = CApp + ' UINT32 FieldSize;\n' CApp = CApp + ' CHAR8 *Value;\n' CApp = CApp + ' UINT32 OriginalSize;\n' CApp = CApp + ' VOID *OriginalPcd;\n' - CApp = CApp + ' %s *Pcd;\n' % (Pcd.DatumType) + CApp = CApp + ' %s *Pcd; // From %s Line %d \n' % (Pcd.DatumType, Pcd.PkgPath, Pcd.PcdDefineLineNo) CApp = CApp + '\n' Pcd.DefaultValue = Pcd.DefaultValue.strip() PcdDefaultValue = StringToArray(Pcd.DefaultValue) -- 2.14.3.windows.1