Package vtrace :: Module snapshot :: Class TraceSnapshot
[hide private]
[frames] | no frames]

Class TraceSnapshot

source code


A tracer snapshot is similar to a traditional "core file" except that you may also have memory only snapshots that are never written to disk.

TraceSnapshots allow you to take a picture of a process from a given point in it's execution and manipulate/test from there or save it to disk for later analysis...

Instance Methods [hide private]
 
__init__(self, snapdict)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
saveToFd(self, fd)
Save this snapshot to the given file like object for later reloading...
source code
 
saveToFile(self, filename)
Save a snapshot to file for later reading in...
source code
 
getMemoryMap(self, addr) source code
 
platformGetFds(self)
Return what getFds() wants for this particular platform
source code
 
getExe(self)
Get the full path to the main executable for this *attached* Trace
source code
 
getStackTrace(self)
Returns a list of (instruction pointer, stack frame) tuples.
source code
 
platformGetRegCtx(self, thrid) source code
 
platformGetMaps(self)
Return a list of the memory maps where each element has the following structure: (address, length, perms, file="") NOTE: By Default this list is available as Trace.maps because the default implementation attempts to populate them on every break/stop/etc...
source code
 
platformGetThreads(self)
Return a dictionary of <threadid>:<tinfo> pairs where tinfo is either the stack top, or the teb for win32
source code
 
platformReadMemory(self, address, size) source code
 
platformWriteMemory(self, address, bytes) source code
 
platformDetach(self)
Actually perform the detach for this type
source code
 
platformParseBinary(self, *args)
Platforms must parse the given binary file and load any symbols into the internal SymbolResolver using self.addSymbol()
source code
 
cacheRegs(self, threadid) source code
 
syncRegs(self) source code

Inherited from Trace: addBreakByAddr, addBreakByExpr, addBreakpoint, addIgnoreSignal, allocateMemory, attach, buildNewTrace, call, delIgnoreSignal, deregisterNotifier, detach, disableAutoContinue, enableAutoContinue, execute, getAutoContinueList, getBreakpoint, getBreakpointByAddr, getBreakpointCode, getBreakpointEnabled, getBreakpoints, getCurrentBreakpoint, getCurrentSignal, getCurrentThread, getFds, getMemoryFault, getMemoryMaps, getMeta, getMode, getNormalizedLibNames, getNotifiers, getPid, getRegister, getRegisterContext, getStruct, getStructNames, getSymByAddr, getSymByAddrThunkAware, getSymByName, getSymsForFile, getThreads, getVariable, getVariables, hasExited, hasMeta, hex, injectThread, injectso, isAttached, isRemote, isRunning, isThreadSuspended, joinThread, kill, parseExpression, parseOpcodes, protectMemory, ps, readMemory, registerNotifier, release, removeBreakpoint, requireAttached, requireNotExited, requireNotRunning, resumeThread, run, runAgain, searchMemory, searchMemoryRange, searchSymbols, selectThread, sendBreak, setBreakpointCode, setBreakpointEnabled, setCurrentSignal, setMeta, setMode, setRegister, setSymCachePath, setVariable, stepi, suspendThread, writeMemory

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Inherited from platforms.base.TracerBase: __del__, addLibraryBase, archActivBreakpoint, archAddWatchpoint, archCheckWatchpoints, archClearBreakpoint, archGetRegCtx, archGetStackTrace, archRemWatchpoint, checkBreakpoints, checkPageWatchpoints, checkWatchpoints, delLibraryBase, doStepLoop, fireNotifiers, fireTracerThread, getResolverForFile, initMode, nextBpId, normFileName, notify, platformAllocateMemory, platformAttach, platformCall, platformContinue, platformExec, platformGetMemFault, platformGetSignal, platformInjectSo, platformInjectThread, platformKill, platformOpenFile, platformProcessEvent, platformProtectMemory, platformPs, platformRelease, platformResumeThread, platformSelectThread, platformSetRegCtx, platformSetSignal, platformStepi, platformSuspendThread, platformWait, shouldRunAgain, steploop, wait

Inherited from platforms.base.TracerBase (private): _activBreakpoints, _cacheRegs, _checkForBreakpoint, _cleanupResources, _clearBreakpoints, _doRun, _doWait, _findLibraryMaps, _fireBreakpoint, _fireExit, _fireExitThread, _fireSignal, _fireStep, _justAttached, _loadBinary, _loadBinaryNorm, _simpleCreateThreads, _syncRegs, _tellThreadExit

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, snapdict)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: platforms.base.TracerBase.__init__
(inherited documentation)

platformGetFds(self)

source code 

Return what getFds() wants for this particular platform

Overrides: platforms.base.TracerBase.platformGetFds
(inherited documentation)

getExe(self)

source code 

Get the full path to the main executable for this *attached* Trace

Overrides: platforms.base.TracerBase.getExe
(inherited documentation)

getStackTrace(self)

source code 

Returns a list of (instruction pointer, stack frame) tuples. If stack tracing results in an error, the error entry will be (-1, -1). Otherwise most platforms end up with 0, 0 as the top stack frame

Overrides: platforms.base.TracerBase.getStackTrace
(inherited documentation)

platformGetRegCtx(self, thrid)

source code 
Overrides: platforms.base.TracerBase.platformGetRegCtx

platformGetMaps(self)

source code 

Return a list of the memory maps where each element has the following structure: (address, length, perms, file="") NOTE: By Default this list is available as Trace.maps because the default implementation attempts to populate them on every break/stop/etc...

Overrides: platforms.base.TracerBase.platformGetMaps
(inherited documentation)

platformGetThreads(self)

source code 

Return a dictionary of <threadid>:<tinfo> pairs where tinfo is either the stack top, or the teb for win32

Overrides: platforms.base.TracerBase.platformGetThreads
(inherited documentation)

platformReadMemory(self, address, size)

source code 
Overrides: platforms.base.TracerBase.platformReadMemory

platformWriteMemory(self, address, bytes)

source code 
Overrides: platforms.base.TracerBase.platformWriteMemory

platformDetach(self)

source code 

Actually perform the detach for this type

Overrides: platforms.base.TracerBase.platformDetach
(inherited documentation)

platformParseBinary(self, *args)

source code 

Platforms must parse the given binary file and load any symbols into the internal SymbolResolver using self.addSymbol()

Overrides: platforms.base.TracerBase.platformParseBinary
(inherited documentation)