The Emulator class is mostly "Abstract" in the java
Interface sense. The emulator should be able to be extended for the
architecutures which are included in the envi framework. You *must* mix
in an instance of your architecture abstraction module.
The intention is for "light weight" emulation to be
implemented mostly for user-space emulation of protected mode
execution.
|
|
__init__(self,
archmod=None)
Hand in a register definition which consists of a list of
(<name>, <width>) tuples. |
source code
|
|
|
|
|
|
|
executeOpcode(self,
opobj)
This is the core method for the |
source code
|
|
|
|
|
|
|
getCallArgs(self,
count,
cc)
Emulator implementors can implement this method to allow analysis
modules a platform/architecture independant way to get
stack/reg/whatever args. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
getOperAddr(self,
op,
idx)
Return the address that an operand which deref's memory would read
from on getOperValue(). |
source code
|
|
|
|
getOperValue(self,
op,
idx)
Return the value for the operand at index idx for the given opcode
reading memory and register states if necissary. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
run(self,
stepcount=None)
Run the emulator until "something" happens. |
source code
|
|
|
|
|
|
|
|
|
|
setReturnValue(self,
value,
cc,
argc=0)
Emulator implementors can implement this method to allow analysis
modules a platform/architecture independant way to set a function
return value. |
source code
|
|
|
|
setSegmentInfo(self,
idx,
base,
size)
Set a base and size for a given segment index. |
source code
|
|
|
|
|
|
Inherited from registers.RegisterContext:
addMetaRegister,
getMetaRegInfo,
getProgramCounter,
getRegDef,
getRegister,
getRegisterByName,
getRegisterIndex,
getRegisterInfo,
getRegisterName,
getRegisterNameIndexes,
getRegisterNames,
getRegisterSnap,
getRegisterWidth,
getRegisters,
getStackCounter,
isDirty,
isMetaRegister,
loadRegDef,
loadRegMetas,
reprRegister,
setIsDirty,
setProgramCounter,
setRegister,
setRegisterByName,
setRegisterIndexes,
setRegisterInfo,
setRegisterSnap,
setRegisters,
setStackCounter
Inherited from memory.MemoryObject:
addMemoryMap,
getByteDef,
getMemoryMap,
getMemoryMaps,
getMemorySnap,
readMemory,
setMemorySnap,
writeMemory
Inherited from memory.IMemory:
allocateMemory,
getPointerSize,
isExecutable,
isReadable,
isShared,
isValidPointer,
isWriteable,
parseOpcode,
probeMemory,
protectMemory,
readMemValue,
readMemoryFormat,
searchMemory,
searchMemoryRange,
writeMemoryFormat
|