summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/build/BuildReport.py
diff options
context:
space:
mode:
authorYunhua Feng <yunhuax.feng@intel.com>2018-07-24 19:30:11 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-07-27 14:08:49 +0800
commitcef7ecf6cdb44de1520c5d0be9b2c982b59eabc4 (patch)
tree172d530b42cb70270b1a71f7fe708f5e2c6ed927 /BaseTools/Source/Python/build/BuildReport.py
parentf413763b6b8f2798595d468cf868ae5985d3eabc (diff)
downloadedk2-cef7ecf6cdb44de1520c5d0be9b2c982b59eabc4.tar.gz
edk2-cef7ecf6cdb44de1520c5d0be9b2c982b59eabc4.tar.bz2
edk2-cef7ecf6cdb44de1520c5d0be9b2c982b59eabc4.zip
BaseTools: Fix bug about *M value not display decimal and hexadecimal
V2: Add the check for Pcd DatumType report format like as below: *M Shell.inf = 0xFF (255) Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/build/BuildReport.py')
-rw-r--r--BaseTools/Source/Python/build/BuildReport.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py
index 27680019dc..5709cde9d6 100644
--- a/BaseTools/Source/Python/build/BuildReport.py
+++ b/BaseTools/Source/Python/build/BuildReport.py
@@ -1127,7 +1127,13 @@ class PcdReport(object):
for Array in ArrayList:
FileWrite(File, Array)
else:
- FileWrite(File, ' *M %-*s = %s' % (self.MaxLen + 15, ModulePath, ModuleDefault.strip()))
+ Value = ModuleDefault.strip()
+ if Pcd.DatumType in TAB_PCD_CLEAN_NUMERIC_TYPES:
+ if Value.startswith(('0x', '0X')):
+ Value = '{} ({:d})'.format(Value, int(Value, 0))
+ else:
+ Value = "0x{:X} ({})".format(int(Value, 0), Value)
+ FileWrite(File, ' *M %-*s = %s' % (self.MaxLen + 15, ModulePath, Value))
if ModulePcdSet is None:
FileWrite(File, gSectionEnd)