The main tracer object. A trace instance is dynamically generated
using this and *many* potential mixin classes. However, API users should
*not* worry about the methods that come from the mixins... Everything
that is *meant* to be used from the API is contained and documented
here.
|
__init__(self,
archname=None)
Hand in a register definition which consists of a list of
(<name>, <width>) tuples. |
source code
|
|
|
|
|
|
|
|
|
addIgnoreSignal(self,
code,
address=0)
By adding an IgnoreSignal you tell the tracer object to supress the
notification of a particular type of signal. |
source code
|
|
|
allocateMemory(self,
size,
perms=7,
suggestaddr=0)
Allocate a chunk of memory inside the target process' address space. |
source code
|
|
|
attach(self,
pid)
Attach to a new process ID. |
source code
|
|
|
|
|
call(self,
address,
args,
convention=None)
Setup the "stack" and call the target address with the
following arguments. |
source code
|
|
|
|
|
|
|
detach(self)
Detach from the currently attached process. |
source code
|
|
|
disableAutoContinue(self,
event)
Disable Auto Continue for the specified event. |
source code
|
|
|
|
|
execute(self,
cmdline)
Start a new process and debug it |
source code
|
|
|
getAutoContinueList(self)
Retrieve the list of vtrace notification events that will be
auto-continued. |
source code
|
|
|
|
|
getBreakpointByAddr(self,
va)
Return the breakpoint object (or None) for a given virtual address. |
source code
|
|
|
getBreakpointCode(self,
bpid)
Return the python string of user specified code that will run when
this breakpoint is hit. |
source code
|
|
|
|
|
getBreakpoints(self)
Return a list of the current breakpoints. |
source code
|
|
|
getCurrentBreakpoint(self)
Return the current breakpoint otherwise None |
source code
|
|
|
|
|
getCurrentThread(self)
Return the thread id of the currently selected thread. |
source code
|
|
|
|
|
getMemoryFault(self)
If the most receent event is a memory access error, this API will
return a tuple of (<addr>,<perm>) on supported platforms. |
source code
|
|
|
|
|
|
|
getMode(self,
name,
default=False)
Get the value for a mode setting allowing for a clean default... |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getStruct(self,
sname,
address)
Retrieve a vstruct structure populated with memory from the specified
address. |
source code
|
|
|
getStructNames(self,
namespace=None)
This method returns either the structure names, or
the structure namespaces that the target tracer is aware
of. |
source code
|
|
|
|
|
|
|
getSymsForFile(self,
libname)
Return the entire symbol list for the specified normalized library
name. |
source code
|
|
|
getThreads(self)
Get a dictionary of <threadid>:<tinfo> pairs where tinfo
is platform dependant, but is tyically either the top of the stack
for that thread, or the TEB on win32 |
source code
|
|
|
|
|
getVariables(self)
Get the dictionary of named variables. |
source code
|
|
|
|
|
hex(self,
value)
Much like the python hex routine, except this will automatically pad
the value's string length out to pointer width. |
source code
|
|
|
|
|
|
|
isAttached(self)
Return boolean true/false for weather or not this trace is currently
attached to a process. |
source code
|
|
|
isRemote(self)
Returns True if the trace is a CobraProxy object to a trace on
another system |
source code
|
|
|
isRunning(self)
Return true or false if this trace's target process is
"running". |
source code
|
|
|
isThreadSuspended(self,
threadid)
Used to determine if a thread is suspended. |
source code
|
|
|
joinThread(self,
threadid)
Run the trace in a loop until the specified thread exits. |
source code
|
|
|
kill(self)
Kill the target process for this trace (will result in process exit
and fire appropriate notifiers) |
source code
|
|
|
parseExpression(self,
expression)
Parse a python expression with many useful helpers mapped into the
execution namespace. |
source code
|
|
|
|
|
ps(self)
Return a list of proccesses which are currently running on the
system. |
source code
|
|
|
|
|
|
|
|
|
removeBreakpoint(self,
id)
Remove the breakpoint with the specified ID |
source code
|
|
|
requireAttached(self)
A utility method for other methods to use in order to require being
attached |
source code
|
|
|
|
|
requireNotRunning(self)
Just a quick method to throw an error if the tracer is already
running... |
source code
|
|
|
resumeThread(self,
threadid)
Resume a suspended thread. |
source code
|
|
|
run(self,
until=None)
Allow the traced target to continue execution. |
source code
|
|
|
runAgain(self,
val=True)
The runAgain() method may be used from inside a notifier (Notifier,
Breakpoint, Watchpoint, etc...) to inform the trace that once event
processing is complete, it should continue running the trace. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
setBreakpointCode(self,
bpid,
pystr)
Because breakpoints are potentially on the remote debugger and code
is not pickleable in python, special access methods which takes
strings of python code are necissary for the vdb interface to quick
script breakpoint code. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
setVariable(self,
name,
value)
Set a named variable in the trace which may be used in subsequent
VtraceExpressions. |
source code
|
|
|
stepi(self)
Single step the target process ONE instruction (and do NOT activate
breakpoints for the one step). |
source code
|
|
|
|
|
|
Inherited from envi.memory.IMemory :
addMemoryMap ,
getMemoryMap ,
getPointerSize ,
getSegmentInfo ,
isExecutable ,
isReadable ,
isShared ,
isValidPointer ,
isWriteable ,
parseOpcode ,
probeMemory ,
readMemValue ,
readMemoryFormat ,
writeMemoryFormat
Inherited from envi.registers.RegisterContext :
addMetaRegister ,
getMetaRegInfo ,
getProgramCounter ,
getRegDef ,
getRegisterByName ,
getRegisterIndex ,
getRegisterInfo ,
getRegisterName ,
getRegisterNameIndexes ,
getRegisterNames ,
getRegisterSnap ,
getRegisterWidth ,
getRegisters ,
getStackCounter ,
isDirty ,
isMetaRegister ,
loadRegDef ,
loadRegMetas ,
reprRegister ,
setIsDirty ,
setProgramCounter ,
setRegisterByName ,
setRegisterIndexes ,
setRegisterInfo ,
setRegisterSnap ,
setRegisters ,
setStackCounter
Inherited from envi.resolver.SymbolResolver :
addSymbol ,
delSymbol ,
getSymHint ,
getSymList
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|