BaseTools:Translate the StructurePCD value in field to correct format.

For StructurePCD value got from DSC file, translate its field value in to
correct format in report.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: ZhiqiangX Zhao <zhiqiangx.zhao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
Zhaozh1x 2018-10-18 17:46:40 +08:00 committed by Liming Gao
parent da2d4f76b7
commit 2855e9c330
1 changed files with 2 additions and 5 deletions

View File

@ -1903,15 +1903,12 @@ class DscBuildData(PlatformBuildClassObject):
IsArray = IsFieldValueAnArray(FieldList[FieldName][0])
if IsArray:
try:
FieldValue = ValueExpressionEx(FieldList[FieldName][0], TAB_VOID, self._GuidDict)(True)
FieldList[FieldName][0] = ValueExpressionEx(FieldList[FieldName][0], TAB_VOID, self._GuidDict)(True)
except BadExpression:
EdkLogger.error('Build', FORMAT_INVALID, "Invalid value format for %s. From %s Line %d " %
(".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName, FieldName)), FieldList[FieldName][1], FieldList[FieldName][2]))
try:
if IsArray:
Value, ValueSize = ParseFieldValue (FieldValue)
else:
Value, ValueSize = ParseFieldValue (FieldList[FieldName][0])
Value, ValueSize = ParseFieldValue (FieldList[FieldName][0])
except Exception:
EdkLogger.error('Build', FORMAT_INVALID, "Invalid value format for %s. From %s Line %d " % (".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName, FieldName)), FieldList[FieldName][1], FieldList[FieldName][2]))
if isinstance(Value, str):