Package envi
[hide private]
[frames] | no frames]

Package envi

source code

The Envi framework allows architecutre abstraction through the use of the ArchitectureModule, Opcode, Operand, and Emulator objects.

Submodules [hide private]

Classes [hide private]
  ArchitectureModule
An architecture module implementes methods to deal with the creation of envi objects for the specified architecture.
  EnviException
  InvalidInstruction
Raised by opcode parsers when the specified bytes do not represent a valid opcode
  SegmentationViolation
Raised by an Emulator extension when you bad-touch memory.
  ArchNotImplemented
Raised by various Envi components when the architecture does not implement that envi component.
  EmuException
A parent for all emulation exceptions so catching them can be easy.
  UnsupportedInstruction
Raised by emulators when the given instruction is not implemented by the emulator.
  DivideByZero
Raised by an Emulator when a divide/mod has a 0 divisor...
  BreakpointHit
Raised by an emulator when you execute a breakpoint instruction
  PDEUndefinedFlag
This exception is raised when a conditional operation is dependant on a flag state that is unknown.
  PDEException
This exception is used in partially defined emulation to signal where execution flow becomes un-known due to undefined values.
  UnknownCallingConvention
Raised when the getCallArgs() or setReturnValue() methods are given an unknown calling convention type.
  MapOverlapException
Raised when adding a memory map to a MemoryObject which overlaps with another already existing map.
  Operand
Thses are the expected methods needed by any implemented operand object attached to an envi Opcode.
  DerefOper
  ImmedOper
  RegisterOper
  Opcode
A universal representation for an opcode
  Emulator
The Emulator class is mostly "Abstract" in the java Interface sense.
  CallingConvention
Implement calling conventions for your arch.
Functions [hide private]
 
stealArchMethods(obj, archname)
Used by objects which are expected to inherit from an architecture module but don't know which one until runtime!
source code
 
getCurrentArch()
Return an envi normalized name for the current arch.
source code
 
getArchModule(name=None)
return an Envi architecture module instance for the following architecture name.
source code
Variables [hide private]
  IF_NOFALL = 1
  IF_PRIV = 2
  IF_CALL = 4
  IF_BRANCH = 8
  IF_RET = 16
  BR_PROC = 1
  BR_COND = 2
  BR_DEREF = 4
  BR_TABLE = 8
  BR_FALL = 16
  arch_xlate_32 = {'': 'i386', 'AMD64': 'i386', 'i386': 'i386', ...
  arch_xlate_64 = {'': 'amd64', 'AMD64': 'amd64', 'amd64': 'amd6...
  __package__ = 'envi'
Function Details [hide private]

getArchModule(name=None)

source code 

return an Envi architecture module instance for the following architecture name.

Current architectures include:

i386 - Intel i386 amd64 - The new 64bit AMD spec.


Variables Details [hide private]

arch_xlate_32

Value:
{'': 'i386',
 'AMD64': 'i386',
 'i386': 'i386',
 'i486': 'i386',
 'i586': 'i386',
 'i686': 'i386',
 'i86pc': 'i386',
 'x86': 'i386'}

arch_xlate_64

Value:
{'': 'amd64',
 'AMD64': 'amd64',
 'amd64': 'amd64',
 'i386': 'amd64',
 'x86_64': 'amd64'}