summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py')
-rw-r--r--BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py b/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
index d962ab0add..8750db998f 100644
--- a/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
+++ b/BaseTools/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
@@ -31,7 +31,7 @@ __copyright__ = "Copyright (c) 2008 - 2018, Intel Corporation. All rights reserv
#====================================== Internal Libraries ========================================
#============================================== Code ===============================================
-symRe = re.compile('^([\da-fA-F]+):([\da-fA-F]+) +([\.\-:\\\\\w\?@\$<>]+) +([\da-fA-F]+)', re.UNICODE)
+symRe = re.compile(r'^([\da-fA-F]+):([\da-fA-F]+) +([\.\-:\\\\\w\?@\$<>]+) +([\da-fA-F]+)', re.UNICODE)
def parsePcdInfoFromMapFile(mapfilepath, efifilepath):
""" Parse map file to get binary patch pcd information
@@ -49,7 +49,7 @@ def parsePcdInfoFromMapFile(mapfilepath, efifilepath):
if len(lines) == 0: return None
firstline = lines[0].strip()
- if re.match('^\s*Address\s*Size\s*Align\s*Out\s*In\s*Symbol\s*$', firstline):
+ if re.match(r'^\s*Address\s*Size\s*Align\s*Out\s*In\s*Symbol\s*$', firstline):
return _parseForXcodeAndClang9(lines, efifilepath)
if (firstline.startswith("Archive member included ") and
firstline.endswith(" file (symbol)")):
@@ -59,12 +59,12 @@ def parsePcdInfoFromMapFile(mapfilepath, efifilepath):
return _parseGeneral(lines, efifilepath)
def _parseForXcodeAndClang9(lines, efifilepath):
- valuePattern = re.compile('^([\da-fA-FxX]+)([\s\S]*)([_]*_gPcd_BinaryPatch_([\w]+))')
+ valuePattern = re.compile(r'^([\da-fA-FxX]+)([\s\S]*)([_]*_gPcd_BinaryPatch_([\w]+))')
status = 0
pcds = []
for line in lines:
line = line.strip()
- if status == 0 and (re.match('^\s*Address\s*Size\s*Align\s*Out\s*In\s*Symbol\s*$', line) \
+ if status == 0 and (re.match(r'^\s*Address\s*Size\s*Align\s*Out\s*In\s*Symbol\s*$', line) \
or line == "# Symbols:"):
status = 1
continue
@@ -77,7 +77,7 @@ def _parseForXcodeAndClang9(lines, efifilepath):
def _parseForGCC(lines, efifilepath):
""" Parse map file generated by GCC linker """
- dataPattern = re.compile('^.data._gPcd_BinaryPatch_([\w_\d]+)$')
+ dataPattern = re.compile(r'^.data._gPcd_BinaryPatch_([\w_\d]+)$')
status = 0
imageBase = -1
sections = []
@@ -136,7 +136,7 @@ def _parseGeneral(lines, efifilepath):
status = 0 #0 - beginning of file; 1 - PE section definition; 2 - symbol table
secs = [] # key = section name
bPcds = []
- symPattern = re.compile('^[_]+gPcd_BinaryPatch_([\w]+)')
+ symPattern = re.compile(r'^[_]+gPcd_BinaryPatch_([\w]+)')
for line in lines:
line = line.strip()