def __init__(self):
self.casesens = False
self.phandle = None
self.thandles = {}
self.win32threads = {}
self.dosdevs = []
self.flushcache = False
self.faultaddr = None
global dbgprivdone
if not dbgprivdone:
dbgprivdone = getDebugPrivileges()
self._is_wow64 = False # 64 bit trace uses this...
self._step_suspends = set() # Threads we have suspended for single stepping
# Skip the attach event and plow through to the first
# injected breakpoint (cause libs are loaded by then)
self.enableAutoContinue(vtrace.NOTIFY_ATTACH)
self.setupDosDeviceMaps()
# Setup our binary format meta
self.setMeta('Format','pe')
# Setup some win32_ver info in metadata
rel,ver,csd,ptype = platform.win32_ver()
self.setMeta("WindowsRelease",rel)
self.setMeta("WindowsVersion", ver)
self.setMeta("WindowsCsd", csd)
self.setMeta("WindowsProcessorType", ptype)
# Setup modes which only apply to windows systems
self.initMode('BlockStep', False, 'Single step to branch entry points')
# If possible, get a default set of struct definitions
# for ntdll...
nt = vs_windows.getCurrentDef('ntdll')
if nt != None:
self.vsbuilder.addVStructNamespace('ntdll', nt)
# Either way, add the fallback "win32" namespace
self.vsbuilder.addVStructNamespace('win32', vs_win32)
# We need thread proxying for a few calls...
self.fireTracerThread()
评论列表
文章目录