From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 D30AE211B696B for ; Sun, 3 Feb 2019 22:48:09 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Feb 2019 22:48:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,559,1539673200"; d="scan'208";a="119768970" Received: from bfeng1-mobl1.ccr.corp.intel.com ([10.254.82.87]) by fmsmga007.fm.intel.com with ESMTP; 03 Feb 2019 22:48:08 -0800 From: "Feng, Bob C" To: edk2-devel@lists.01.org Cc: Bob Feng , Liming Gao Date: Mon, 4 Feb 2019 14:48:01 +0800 Message-Id: <20190204064802.14616-2-bob.c.feng@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 In-Reply-To: <20190204064802.14616-1-bob.c.feng@intel.com> References: <20190204064802.14616-1-bob.c.feng@intel.com> Subject: [Patch 2/3] BaseTools: Fixed an issue about StructurePcd X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 06:48:10 -0000 If use a structure pcd in fdf, build tool crash This is a regression issue introduced by py3 patch set. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao --- BaseTools/Source/Python/Workspace/BuildClassObject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/Workspace/BuildClassObject.py b/BaseTools/Source/Python/Workspace/BuildClassObject.py index cff77a71ae..41759b8785 100644 --- a/BaseTools/Source/Python/Workspace/BuildClassObject.py +++ b/BaseTools/Source/Python/Workspace/BuildClassObject.py @@ -268,10 +268,11 @@ class StructurePcd(PcdClassObject): self.PkgPath = "" self.DefaultValueFromDec = "" self.ValueChain = set() self.PcdFieldValueFromComm = OrderedDict() self.PcdFieldValueFromFdf = OrderedDict() + self.DefaultFromDSC=None def __repr__(self): return self.TypeName def AddDefaultValue (self, FieldName, Value, FileName="", LineNo=0,DimensionAttr ="-1"): if DimensionAttr not in self.DefaultValues: @@ -324,11 +325,10 @@ class StructurePcd(PcdClassObject): if isinstance(PcdObject, StructurePcd): self.StructuredPcdIncludeFile = PcdObject.StructuredPcdIncludeFile if PcdObject.StructuredPcdIncludeFile else self.StructuredPcdIncludeFile self.PackageDecs = PcdObject.PackageDecs if PcdObject.PackageDecs else self.PackageDecs self.DefaultValues = PcdObject.DefaultValues if PcdObject.DefaultValues else self.DefaultValues self.PcdMode = PcdObject.PcdMode if PcdObject.PcdMode else self.PcdMode - self.DefaultFromDSC=None self.DefaultValueFromDec = PcdObject.DefaultValueFromDec if PcdObject.DefaultValueFromDec else self.DefaultValueFromDec self.SkuOverrideValues = PcdObject.SkuOverrideValues if PcdObject.SkuOverrideValues else self.SkuOverrideValues 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 -- 2.18.0.windows.1