#\r
# This tool depends on DIA2Dump.exe (VS) or nm (gcc) to parse debug entry.\r
#\r
-# Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
-# This program and the accompanying materials are licensed and made available under\r
-# the terms and conditions of the BSD License that accompanies this distribution.\r
-# The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php.\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+# Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
##\r
\r
from optparse import OptionParser\r
\r
versionNumber = "1.1"\r
-__copyright__ = "Copyright (c) 2016, Intel Corporation. All rights reserved."\r
+__copyright__ = "Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved."\r
\r
class Symbols:\r
def __init__(self):\r
reportLines = linefile.readlines()\r
linefile.close()\r
\r
- # 000113ca T AllocatePool c:\home\edk-ii\MdePkg\Library\UefiMemoryAllocationLib\MemoryAllocationLib.c:399\r
+ # 000113ca T AllocatePool c:\home\edk-ii\MdePkg\Library\UefiMemoryAllocationLib\MemoryAllocationLib.c:399\r
patchLineFileMatchString = "([0-9a-fA-F]*)\s+[T|D|t|d]\s+(\w+)\s*((?:[a-zA-Z]:)?[\w+\-./_a-zA-Z0-9\\\\]*):?([0-9]*)"\r
\r
for reportLine in reportLines:\r
linefile.close()\r
\r
# ** GetDebugPrintErrorLevel\r
- # line 32 at [0000C790][0001:0000B790], len = 0x3 c:\home\edk-ii\mdepkg\library\basedebugprinterrorlevellib\basedebugprinterrorlevellib.c (MD5: 687C0AE564079D35D56ED5D84A6164CC)\r
- # line 36 at [0000C793][0001:0000B793], len = 0x5\r
- # line 37 at [0000C798][0001:0000B798], len = 0x2\r
+ # line 32 at [0000C790][0001:0000B790], len = 0x3 c:\home\edk-ii\mdepkg\library\basedebugprinterrorlevellib\basedebugprinterrorlevellib.c (MD5: 687C0AE564079D35D56ED5D84A6164CC)\r
+ # line 36 at [0000C793][0001:0000B793], len = 0x5\r
+ # line 37 at [0000C798][0001:0000B798], len = 0x2\r
\r
patchLineFileMatchString = "\s+line ([0-9]+) at \[([0-9a-fA-F]{8})\]\[[0-9a-fA-F]{4}\:[0-9a-fA-F]{8}\], len = 0x[0-9a-fA-F]+\s*([\w+\-\:./_a-zA-Z0-9\\\\]*)\s*"\r
patchLineFileMatchStringFunc = "\*\*\s+(\w+)\s*"\r
\r
driverPrefixLen = len("Driver - ")\r
# get driver name\r
- if cmp(newline[0:driverPrefixLen],"Driver - ") == 0 :\r
+ if cmp(newline[0:driverPrefixLen], "Driver - ") == 0 :\r
driverlineList = newline.split(" ")\r
driverName = driverlineList[2]\r
#print "Checking : ", driverName\r
else :\r
symbolsFile.symbolsTable[driverName].parse_debug_file (driverName, pdbName)\r
\r
- elif cmp(newline,"") == 0 :\r
+ elif cmp(newline, "") == 0 :\r
driverName = ""\r
\r
# check entry line\r
rvaName = ""\r
symbolName = ""\r
\r
- if cmp(rvaName,"") == 0 :\r
+ if cmp(rvaName, "") == 0 :\r
return newline\r
else :\r
return newline + symbolName\r
return 1\r
\r
try:\r
- while 1:\r
+ while True:\r
line = file.readline()\r
if not line:\r
break\r