Package envi :: Class ArchitectureModule
[hide private]
[frames] | no frames]

Class ArchitectureModule

source code

An architecture module implementes methods to deal with the creation of envi objects for the specified architecture.

Instance Methods [hide private]
 
__init__(self, archname, maxinst=32) source code
 
getArchId(self)
Return the envi ARCH_FOO value for this arch.
source code
 
getArchName(self)
Get the "humon" readable name for the arch implemented in this module.
source code
 
archGetBreakInstr(self)
Return a python string of the byte sequence which corresponds to a breakpoint (if present) for this architecture.
source code
 
archGetNopInstr(self)
Return a python string of the byte sequence that corresponds to a no-op (if present) for this architecture.
source code
 
archGetRegCtx(self)
Return an initialized register context object for the architecture.
source code
 
archParseOpcode(self, bytez, offset=0, va=0)
Parse an architecture specific Opcode object from the given bytes.
source code
 
archGetRegisterGroups(self)
Returns a tuple of tuples of registers for different register groups.
source code
 
getEmulator(self)
Return a default instance of an emulator for the given arch.
source code
 
getPointerSize(self)
Get the size of a pointer in memory on this architecture.
source code
 
pointerString(self, va)
Return a string representation for a pointer on this arch
source code
Method Details [hide private]

archGetNopInstr(self)

source code 

Return a python string of the byte sequence that corresponds to a no-op (if present) for this architecture.

Return None if not present for this architecture.

archParseOpcode(self, bytez, offset=0, va=0)

source code 

Parse an architecture specific Opcode object from the given bytes.

offset  - Offset into bytes to begin opcode parsing
va      - Virtual address of the instruction ( for rel calcs )

Example:
    a.archParseOpcode('ëþ', va=0x41414141)

archGetRegisterGroups(self)

source code 

Returns a tuple of tuples of registers for different register groups.
If not implemented for an architecture, returns a single group with
all non-meta registers.

Example:
    [ ('all', ['eax', 'ebx', ...] ), ...]