Reviewed-by: Liming Gao <liming....@intel.com>

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Feng, 
> Bob C
> Sent: Monday, February 4, 2019 2:48 PM
> To: edk2-devel@lists.01.org
> Cc: Gao, Liming <liming....@intel.com>
> Subject: [edk2] [Patch 2/3] BaseTools: Fixed an issue about StructurePcd
> 
> 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 <bob.c.f...@intel.com>
> Cc: Liming Gao <liming....@intel.com>
> ---
>  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
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to