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

Class Operand

source code

Known Subclasses:

Thses are the expected methods needed by any implemented operand object attached to an envi Opcode. This does *not* have a constructor of it's pwn on purpose to cut down on memory use and constructor CPU cost.

Instance Methods [hide private]
 
__eq__(self, oper) source code
 
__ne__(self, op) source code
 
getOperAddr(self, op, emu)
If the operand is a "dereference" operand, this method should use the specified op/emu to resolve the address of the dereference.
source code
 
getOperValue(self, op, emu=None)
Get the current value for the operand.
source code
 
isDeref(self)
If the given operand will dereference memory, this method must return True.
source code
 
isImmed(self)
If the given operand represents an immediate value, this must return True.
source code
 
isReg(self)
If the given operand represents a register value, this must return True.
source code
 
render(self, mcanv, op, idx)
Used by the opcode class when rendering to a memory canvas.
source code
 
repr(self, op)
Used by the Opcode class to get a humon readable string for this operand.
source code
 
setOperValue(self, op, emu, val)
Set the current value for the operand.
source code
Method Details [hide private]

getOperAddr(self, op, emu)

source code 

If the operand is a "dereference" operand, this method should use the
specified op/emu to resolve the address of the dereference.

NOTE: This API may be passed a None emu and should return what it can
      (or None if it can't be resolved)

getOperValue(self, op, emu=None)

source code 

Get the current value for the operand.  If needed, use
the given emulator/workspace/trace to resolve things like
memory and registers.

NOTE: This API may be passed a None emu and should return what it can
      (or None if it can't be resolved)

setOperValue(self, op, emu, val)

source code 

Set the current value for the operand. If needed, use the given emulator/workspace/trace to assign things like memory and registers.