The basis for a tracer's internals. All platformFoo/archFoo functions
are defaulted, and internal state is initialized. Additionally, a number
of internal utilities are housed here.
|
|
|
|
|
|
|
|
|
_cacheRegs(self,
threadid)
Make sure the reg-cache is populated |
source code
|
|
|
|
|
_cleanupBreakpoints(self)
Cleanup all breakpoints (if the current bp is "fastbreak"
this routine will not be called... |
source code
|
|
|
|
|
|
|
|
|
_findLibraryMaps(self,
magic,
always=False) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_syncRegs(self)
Sync the reg-cache into the target process |
source code
|
|
|
|
|
|
|
addLibraryBase(self,
libname,
address,
always=False)
This should be used *at load time* to setup the library event
metadata. |
source code
|
|
|
|
|
archCheckWatchpoints(self)
If the current register state indicates that a watchpoint was hit,
return the address of the watchpoint and clear the event. |
source code
|
|
|
archGetRegCtx(self)
Return a new empty envi.registers.RegisterContext object for this
trace. |
source code
|
|
|
|
|
|
|
checkBreakpoints(self)
This is mostly for systems (like linux) where you can't tell the
difference between some SIGSTOP/SIGBREAK conditions and an actual
breakpoint instruction. |
source code
|
|
|
checkPageWatchpoints(self)
Check if the given memory fault was part of a valid MapWatchpoint. |
source code
|
|
|
|
|
|
|
|
|
fireNotifiers(self,
event)
Fire the registered notifiers for the NOTIFY_* event. |
source code
|
|
|
|
|
getExe(self)
Get the full path to the main executable for this *attached* Trace |
source code
|
|
|
|
|
|
|
initMode(self,
name,
value,
descr)
Initialize a mode, this should ONLY be called during setup routines
for the trace! It determines the available mode setings. |
source code
|
|
|
|
|
|
|
notify(self,
event,
trace)
We are frequently a notifier for ourselves, so we can do things like
handle events on attach and on break in a unified fashion. |
source code
|
|
|
platformAllocateMemory(self,
size,
perms=7,
suggestaddr=0) |
source code
|
|
|
|
|
platformCall(self,
address,
args,
convention=None)
Platform call takes an address, and an array of args (string types
will be mapped and located for you) |
source code
|
|
|
|
|
platformDetach(self)
Actually perform the detach for this type |
source code
|
|
|
platformExec(self,
cmdline)
Platform exec will execute the process specified in cmdline and
return the PID |
source code
|
|
|
platformGetFds(self)
Return what getFds() wants for this particular platform |
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
|
|
|
platformGetMemFault(self)
Return the addr of the current memory fault or None |
source code
|
|
|
|
|
platformGetSignal(self)
Return the currently posted exception/signal.... |
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
|
|
|
|
|
|
|
|
|
|
|
platformParseBinary(self,
filename,
baseaddr,
normname)
Platforms must parse the given binary file and load any symbols into
the internal SymbolResolver using self.addSymbol() |
source code
|
|
|
|
|
platformProtectMemory(self,
va,
size,
perms) |
source code
|
|
|
platformPs(self)
Actually return a list of tuples in the format (pid, name) for this
platform |
source code
|
|
|
|
|
platformRelease(self)
Called back on release. |
source code
|
|
|
|
|
platformSelectThread(self,
thrid)
Platform implementers are encouraged to use the metadata field
"ThreadId" as the identifier (int) for which thread has
"focus". |
source code
|
|
|
|
|
|
|
platformStepi(self)
PlatformStepi should be ATOMIC, meaning it gets called, and by the
time it returns, you're one step further. |
source code
|
|
|
|
|
platformWait(self)
Wait for something interesting to occur and return a *platform
specific* representation of what happened. |
source code
|
|
|
|
|
|
|
shouldRunAgain(self)
A unified place for the test as to weather this trace should be told
to run again after reaching some stopping condition. |
source code
|
|
|
steploop(self)
Continue stepi'ing in a loop until shouldRunAgain() returns false
(like RunForever mode or something) |
source code
|
|
|
wait(self)
Wait for the trace target to have something happen... |
source code
|
|
Inherited from notifiers.Notifier :
handleEvent
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|