mirror of https://github.com/acidanthera/audk.git
BaseTools: Fix the build report crash issue
In the following corner case, the build report will crash. This patch is to fix this problem. Case: Multiple SKU are used and 2 more DynamicHii structure Pcds are set in dsc file under different SKU. And 1 more of those Pcds are not used in any INF file. Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Yuwei Chen<yuwei.chen@intel.com>
This commit is contained in:
parent
da45a36087
commit
536a3e6726
|
@ -1125,10 +1125,11 @@ class PcdReport(object):
|
||||||
if SkuInfo.DefaultStoreDict:
|
if SkuInfo.DefaultStoreDict:
|
||||||
DefaultStoreList = sorted(SkuInfo.DefaultStoreDict.keys())
|
DefaultStoreList = sorted(SkuInfo.DefaultStoreDict.keys())
|
||||||
for DefaultStore in DefaultStoreList:
|
for DefaultStore in DefaultStoreList:
|
||||||
OverrideValues = Pcd.SkuOverrideValues[Sku]
|
OverrideValues = Pcd.SkuOverrideValues.get(Sku)
|
||||||
DscOverride = self.ParseStruct(OverrideValues[DefaultStore])
|
if OverrideValues:
|
||||||
if DscOverride:
|
DscOverride = self.ParseStruct(OverrideValues[DefaultStore])
|
||||||
break
|
if DscOverride:
|
||||||
|
break
|
||||||
if DscOverride:
|
if DscOverride:
|
||||||
break
|
break
|
||||||
if DscOverride:
|
if DscOverride:
|
||||||
|
@ -1388,9 +1389,10 @@ class PcdReport(object):
|
||||||
FileWrite(File, ' %-*s : %6s %10s %10s %10s = %s' % (self.MaxLen, ' ', TypeName, '(' + Pcd.DatumType + ')', '(' + SkuIdName + ')', '(' + DefaultStore + ')', Value))
|
FileWrite(File, ' %-*s : %6s %10s %10s %10s = %s' % (self.MaxLen, ' ', TypeName, '(' + Pcd.DatumType + ')', '(' + SkuIdName + ')', '(' + DefaultStore + ')', Value))
|
||||||
FileWrite(File, '%*s: %s: %s' % (self.MaxLen + 4, SkuInfo.VariableGuid, SkuInfo.VariableName, SkuInfo.VariableOffset))
|
FileWrite(File, '%*s: %s: %s' % (self.MaxLen + 4, SkuInfo.VariableGuid, SkuInfo.VariableName, SkuInfo.VariableOffset))
|
||||||
if IsStructure:
|
if IsStructure:
|
||||||
OverrideValues = Pcd.SkuOverrideValues[Sku]
|
OverrideValues = Pcd.SkuOverrideValues.get(Sku)
|
||||||
OverrideFieldStruct = self.OverrideFieldValue(Pcd, OverrideValues[DefaultStore])
|
if OverrideValues:
|
||||||
self.PrintStructureInfo(File, OverrideFieldStruct)
|
OverrideFieldStruct = self.OverrideFieldValue(Pcd, OverrideValues[DefaultStore])
|
||||||
|
self.PrintStructureInfo(File, OverrideFieldStruct)
|
||||||
self.PrintPcdDefault(File, Pcd, IsStructure, DscMatch, DscDefaultValue, InfMatch, InfDefaultValue, DecMatch, DecDefaultValue)
|
self.PrintPcdDefault(File, Pcd, IsStructure, DscMatch, DscDefaultValue, InfMatch, InfDefaultValue, DecMatch, DecDefaultValue)
|
||||||
else:
|
else:
|
||||||
Value = SkuInfo.DefaultValue
|
Value = SkuInfo.DefaultValue
|
||||||
|
|
Loading…
Reference in New Issue