summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorFeng, Bob C <bob.c.feng@intel.com>2018-01-31 17:45:02 +0800
committerLiming Gao <liming.gao@intel.com>2018-02-01 09:21:38 +0800
commit75771aebd39ec7c6d383e98085b54c9419d2546e (patch)
tree33cc91a35ca7854269a65faadc5235f5de90d429 /BaseTools
parent8d4d55b15b5887d6906c6d2c434687e5212ed5a7 (diff)
downloadedk2-75771aebd39ec7c6d383e98085b54c9419d2546e.tar.gz
edk2-75771aebd39ec7c6d383e98085b54c9419d2546e.tar.bz2
edk2-75771aebd39ec7c6d383e98085b54c9419d2546e.zip
BaseTool: Add comments in PcdValueInit.c.
Add Comments for __FLEXIBLE_SIZE () statement. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/Workspace/DscBuildData.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index 012e16a488..214e4fd569 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -1327,9 +1327,10 @@ class DscBuildData(PlatformBuildClassObject):
IsArray = self.IsFieldValueAnArray(FieldList[FieldName.strip(".")][0])
if IsArray:
Value, ValueSize = ParseFieldValue (FieldList[FieldName.strip(".")][0])
- CApp = CApp + ' __FLEXIBLE_SIZE(Size, %s, %s, %d / __ARRAY_ELEMENT_SIZE(%s, %s) + ((%d %% __ARRAY_ELEMENT_SIZE(%s, %s)) ? 1 : 0));\n' % (Pcd.DatumType, FieldName.strip("."), ValueSize, Pcd.DatumType, FieldName.strip("."), ValueSize, Pcd.DatumType, FieldName.strip("."));
+ CApp = CApp + ' __FLEXIBLE_SIZE(Size, %s, %s, %d / __ARRAY_ELEMENT_SIZE(%s, %s) + ((%d %% __ARRAY_ELEMENT_SIZE(%s, %s)) ? 1 : 0)); // From %s Line %d Value %s \n' % (Pcd.DatumType, FieldName.strip("."), ValueSize, Pcd.DatumType, FieldName.strip("."), ValueSize, Pcd.DatumType, FieldName.strip("."), FieldList[FieldName.strip(".")][1], FieldList[FieldName.strip(".")][2], FieldList[FieldName.strip(".")][0]);
else:
NewFieldName = ''
+ FieldName_ori = FieldName.strip('.')
while '[' in FieldName:
NewFieldName = NewFieldName + FieldName.split('[', 1)[0] + '[0]'
ArrayIndex = int(FieldName.split('[', 1)[1].split(']', 1)[0])
@@ -1337,7 +1338,7 @@ class DscBuildData(PlatformBuildClassObject):
FieldName = NewFieldName + FieldName
while '[' in FieldName:
FieldName = FieldName.rsplit('[', 1)[0]
- CApp = CApp + ' __FLEXIBLE_SIZE(Size, %s, %s, %d);\n' % (Pcd.DatumType, FieldName.strip("."), ArrayIndex + 1)
+ CApp = CApp + ' __FLEXIBLE_SIZE(Size, %s, %s, %d); // From %s Line %d Value %s\n' % (Pcd.DatumType, FieldName.strip("."), ArrayIndex + 1, FieldList[FieldName_ori][1], FieldList[FieldName_ori][2], FieldList[FieldName_ori][0])
for skuname in self.SkuIdMgr.GetSkuChain(SkuName):
inherit_OverrideValues = Pcd.SkuOverrideValues[skuname]
for FieldList in [inherit_OverrideValues.get(DefaultStoreName)]:
@@ -1348,9 +1349,10 @@ class DscBuildData(PlatformBuildClassObject):
IsArray = self.IsFieldValueAnArray(FieldList[FieldName.strip(".")][0])
if IsArray:
Value, ValueSize = ParseFieldValue (FieldList[FieldName.strip(".")][0])
- CApp = CApp + ' __FLEXIBLE_SIZE(Size, %s, %s, %d / __ARRAY_ELEMENT_SIZE(%s, %s) + ((%d %% __ARRAY_ELEMENT_SIZE(%s, %s)) ? 1 : 0));\n' % (Pcd.DatumType, FieldName.strip("."), ValueSize, Pcd.DatumType, FieldName.strip("."), ValueSize, Pcd.DatumType, FieldName.strip("."));
+ CApp = CApp + ' __FLEXIBLE_SIZE(Size, %s, %s, %d / __ARRAY_ELEMENT_SIZE(%s, %s) + ((%d %% __ARRAY_ELEMENT_SIZE(%s, %s)) ? 1 : 0)); // From %s Line %d Value %s\n' % (Pcd.DatumType, FieldName.strip("."), ValueSize, Pcd.DatumType, FieldName.strip("."), ValueSize, Pcd.DatumType, FieldName.strip("."), FieldList[FieldName.strip(".")][1], FieldList[FieldName.strip(".")][2], FieldList[FieldName.strip(".")][0]);
else:
NewFieldName = ''
+ FieldName_ori = FieldName.strip('.')
while '[' in FieldName:
NewFieldName = NewFieldName + FieldName.split('[', 1)[0] + '[0]'
ArrayIndex = int(FieldName.split('[', 1)[1].split(']', 1)[0])
@@ -1358,7 +1360,7 @@ class DscBuildData(PlatformBuildClassObject):
FieldName = NewFieldName + FieldName
while '[' in FieldName:
FieldName = FieldName.rsplit('[', 1)[0]
- CApp = CApp + ' __FLEXIBLE_SIZE(Size, %s, %s, %d);\n' % (Pcd.DatumType, FieldName.strip("."), ArrayIndex + 1)
+ CApp = CApp + ' __FLEXIBLE_SIZE(Size, %s, %s, %d); // From %s Line %d Value %s \n' % (Pcd.DatumType, FieldName.strip("."), ArrayIndex + 1, FieldList[FieldName_ori][1], FieldList[FieldName_ori][2], FieldList[FieldName_ori][0])
if skuname == SkuName:
break