#\r
##\r
\r
+from __future__ import print_function\r
import os\r
import re\r
import sys\r
try:\r
nmCommand = "nm"\r
nmLineOption = "-l"\r
- print "parsing (debug) - " + pdbName\r
+ print("parsing (debug) - " + pdbName)\r
os.system ('%s %s %s > nmDump.line.log' % (nmCommand, nmLineOption, pdbName))\r
except :\r
- print 'ERROR: nm command not available. Please verify PATH'\r
+ print('ERROR: nm command not available. Please verify PATH')\r
return\r
\r
#\r
DIA2DumpCommand = "Dia2Dump.exe"\r
#DIA2SymbolOption = "-p"\r
DIA2LinesOption = "-l"\r
- print "parsing (pdb) - " + pdbName\r
+ print("parsing (pdb) - " + pdbName)\r
#os.system ('%s %s %s > DIA2Dump.symbol.log' % (DIA2DumpCommand, DIA2SymbolOption, pdbName))\r
os.system ('%s %s %s > DIA2Dump.line.log' % (DIA2DumpCommand, DIA2LinesOption, pdbName))\r
except :\r
- print 'ERROR: DIA2Dump command not available. Please verify PATH'\r
+ print('ERROR: DIA2Dump command not available. Please verify PATH')\r
return\r
\r
#\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
try :\r
file = open(Options.inputfilename)\r
except Exception:\r
- print "fail to open " + Options.inputfilename\r
+ print("fail to open " + Options.inputfilename)\r
return 1\r
try :\r
newfile = open(Options.outputfilename, "w")\r
except Exception:\r
- print "fail to open " + Options.outputfilename\r
+ print("fail to open " + Options.outputfilename)\r
return 1\r
\r
try:\r
- while 1:\r
+ while True:\r
line = file.readline()\r
if not line:\r
break\r