Package vivisect :: Package symboliks :: Module emulator :: Class SymbolikEmulator
[hide private]
[frames] | no frames]

Class SymbolikEmulator

source code

Instance Methods [hide private]
 
__init__(self, vw)
The SymbolikEmulator is used to keep state on symbolik execution.
source code
 
setMeta(self, name, val)
Store metadata in the emulator instance for later.
source code
 
getMeta(self, name, default=None)
Retrieve previously stored emulator metadata.
source code
 
parseExpression(self, expr, update=True) source code
 
solveExpression(self, expr, update=True) source code
 
applyEffects(self, effects)
Apply the given effects to the emulator.
source code
 
applyFunctionCall(self, funcsym)
This API allows arch/platform specific emulators to handle (and expand out) function calls to modify the emulator state.
source code
 
addRandomSeed(self)
Add a random seed to the name hashing subsystem.
source code
 
getRandomSeed(self) source code
 
readSymMemory(self, symaddr, symsize)
The readSymMemory API is designed to read from the given symbolik address for the specified symbolik length.
source code
 
writeSymMemory(self, symaddr, symval) source code
 
setSymVariable(self, name, symval, width=None) source code
 
getSymVariable(self, name, create=True)
Get the current state of a named symbolic variable.
source code
 
getSymVariables(self)
Retrieve a list of (<varname>, <varsym>) tuples.
source code
Class Variables [hide private]
  __width__ = None
hash(x)
Method Details [hide private]

applyEffects(self, effects)

source code 

Apply the given effects to the emulator. Return a list of updated effects which reflect the state during emulation.

applyFunctionCall(self, funcsym)

source code 

This API allows arch/platform specific emulators to handle (and expand out) function calls to modify the emulator state. A symbolik emulator by itself is *not* function aware, so this does nothing, but on SymbolikFunctionEmulator instances this will modify the machine state to account for the function call...

addRandomSeed(self)

source code 

Add a random seed to the name hashing subsystem. This will produce values which may *only* be compared to other values generated by this solver. It also lets you calculate deltas by solving for deltas between two symbols in different seed inputs to see if they are likely arithmetically related.

readSymMemory(self, symaddr, symsize)

source code 

The readSymMemory API is designed to read from the given symbolik address for the specified symbolik length. If the current symbolik emulator has no knowledge of the state of the given memory symbol, None is returned.

getSymVariable(self, name, create=True)

source code 

Get the current state of a named symbolic variable.

Example:
    v = self.getSymVariable('eax')

getSymVariables(self)

source code 

Retrieve a list of (<varname>, <varsym>) tuples.

Example:
    for vname, vsym in t.getSymVariables():
        print '%s = %s' % (vname, str(vsym))