Changeset 80721 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/BaseTools/Scripts/SmiHandlerProfileSymbolGen.py
- Timestamp:
- Sep 11, 2019 8:46:37 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 133262
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-129237 /vendor/edk2/current 103735-103757,103769-103776,129194-133213
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/BaseTools/Scripts/SmiHandlerProfileSymbolGen.py
r77662 r80721 5 5 # 6 6 # Copyright (c) 2017, Intel Corporation. All rights reserved.<BR> 7 # This program and the accompanying materials are licensed and made available under 8 # the terms and conditions of the BSD License that accompanies this distribution. 9 # The full text of the license may be found at 10 # http://opensource.org/licenses/bsd-license.php. 11 # 12 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 7 # SPDX-License-Identifier: BSD-2-Clause-Patent 14 8 # 15 9 ## 16 10 11 from __future__ import print_function 17 12 import os 18 13 import re … … 62 57 nmCommand = "nm" 63 58 nmLineOption = "-l" 64 print "parsing (debug) - " + pdbName59 print("parsing (debug) - " + pdbName) 65 60 os.system ('%s %s %s > nmDump.line.log' % (nmCommand, nmLineOption, pdbName)) 66 61 except : 67 print 'ERROR: nm command not available. Please verify PATH'62 print('ERROR: nm command not available. Please verify PATH') 68 63 return 69 64 … … 104 99 #DIA2SymbolOption = "-p" 105 100 DIA2LinesOption = "-l" 106 print "parsing (pdb) - " + pdbName101 print("parsing (pdb) - " + pdbName) 107 102 #os.system ('%s %s %s > DIA2Dump.symbol.log' % (DIA2DumpCommand, DIA2SymbolOption, pdbName)) 108 103 os.system ('%s %s %s > DIA2Dump.line.log' % (DIA2DumpCommand, DIA2LinesOption, pdbName)) 109 104 except : 110 print 'ERROR: DIA2Dump command not available. Please verify PATH'105 print('ERROR: DIA2Dump command not available. Please verify PATH') 111 106 return 112 107 … … 205 200 guid = guidLineList[0] 206 201 guidName = guidLineList[1] 207 if guid not in dictGuid .keys():202 if guid not in dictGuid : 208 203 dictGuid[guid] = guidName 209 204 … … 236 231 DOMTree = xml.dom.minidom.parse(Options.inputfilename) 237 232 except Exception: 238 print "fail to open input " + Options.inputfilename233 print("fail to open input " + Options.inputfilename) 239 234 return 1 240 235 … … 243 238 guidreffile = open(Options.guidreffilename) 244 239 except Exception: 245 print "fail to open guidref" + Options.guidreffilename240 print("fail to open guidref" + Options.guidreffilename) 246 241 return 1 247 242 genGuidString(guidreffile) … … 257 252 if smiEntry.hasAttribute("HandlerType"): 258 253 guidValue = smiEntry.getAttribute("HandlerType") 259 if guidValue in dictGuid .keys():254 if guidValue in dictGuid: 260 255 smiEntry.setAttribute("HandlerType", dictGuid[guidValue]) 261 256 SmiHandler = smiEntry.getElementsByTagName("SmiHandler") … … 278 273 Handler = smiHandler.getElementsByTagName("Handler") 279 274 RVA = Handler[0].getElementsByTagName("RVA") 280 print " Handler RVA: %s" % RVA[0].childNodes[0].data275 print(" Handler RVA: %s" % RVA[0].childNodes[0].data) 281 276 282 277 if (len(RVA)) >= 1: … … 290 285 Caller = smiHandler.getElementsByTagName("Caller") 291 286 RVA = Caller[0].getElementsByTagName("RVA") 292 print " Caller RVA: %s" % RVA[0].childNodes[0].data287 print(" Caller RVA: %s" % RVA[0].childNodes[0].data) 293 288 294 289 if (len(RVA)) >= 1: … … 303 298 newfile = open(Options.outputfilename, "w") 304 299 except Exception: 305 print "fail to open output" + Options.outputfilename300 print("fail to open output" + Options.outputfilename) 306 301 return 1 307 302
Note:
See TracChangeset
for help on using the changeset viewer.