C# Class Reko.Core.ProcessorState

ProcessorState simulates the state of the processor and a part of the stack during scanning.
Inheritance: EvaluationContext
Show file Open project: uxmal/reko Class Usage Examples

Public Methods

Method Description
Clone ( ) : ProcessorState
GetDefiningExpression ( Identifier id ) : Expression
GetRegister ( RegisterStorage r ) : Constant
GetValue ( Application appl ) : Expression
GetValue ( Identifier id ) : Expression
GetValue ( MemoryAccess access ) : Expression
GetValue ( RegisterStorage reg ) : Expression
GetValue ( SegmentedAccess access ) : Expression
IsUsedInPhi ( Identifier id ) : bool
MakeSegmentedAddress ( Constant seg, Constant off ) : Expression
OnAfterCall ( FunctionType sigCallee ) : void

Perform any adjustments to the processor's state after returning from a procedure call with the specified signature.

OnBeforeCall ( Identifier stackReg, int returnAddressSize ) : CallSite

Captures the the processor's state before calling a procedure.

OnProcedureEntered ( ) : void
OnProcedureLeft ( FunctionType procedureSignature ) : void
ProcessorState ( ) : Reko.Core.Code
ProcessorState ( ProcessorState orig ) : Reko.Core.Code
RemoveExpressionUse ( Expression expr ) : void
RemoveIdentifierUse ( Identifier id ) : void
SetInstructionPointer ( Address addr ) : void
SetRegister ( RegisterStorage r, Constant v ) : void
SetValue ( RegisterStorage reg, Expression value ) : Constant
SetValue ( Identifier id, Expression value ) : void
SetValueEa ( Expression ea, Expression value ) : void
SetValueEa ( Expression basePtr, Expression ea, Expression value ) : void
UseExpression ( Expression expr ) : void

Private Methods

Method Description
GetStackOffset ( Expression ea, int &offset ) : bool
IsStackRegister ( Expression ea ) : bool

Method Details

Clone() public abstract method

public abstract Clone ( ) : ProcessorState
return ProcessorState

GetDefiningExpression() public method

public GetDefiningExpression ( Identifier id ) : Expression
id Identifier
return Expression

GetRegister() public abstract method

public abstract GetRegister ( RegisterStorage r ) : Constant
r RegisterStorage
return Constant

GetValue() public method

public GetValue ( Application appl ) : Expression
appl Application
return Expression

GetValue() public method

public GetValue ( Identifier id ) : Expression
id Identifier
return Expression

GetValue() public method

public GetValue ( MemoryAccess access ) : Expression
access MemoryAccess
return Expression

GetValue() public method

public GetValue ( RegisterStorage reg ) : Expression
reg RegisterStorage
return Expression

GetValue() public method

public GetValue ( SegmentedAccess access ) : Expression
access SegmentedAccess
return Expression

IsUsedInPhi() public method

public IsUsedInPhi ( Identifier id ) : bool
id Identifier
return bool

MakeSegmentedAddress() public method

public MakeSegmentedAddress ( Constant seg, Constant off ) : Expression
seg Constant
off Constant
return Expression

OnAfterCall() public abstract method

Perform any adjustments to the processor's state after returning from a procedure call with the specified signature.
public abstract OnAfterCall ( FunctionType sigCallee ) : void
sigCallee FunctionType The signature of the called procedure.
return void

OnBeforeCall() public abstract method

Captures the the processor's state before calling a procedure.
public abstract OnBeforeCall ( Identifier stackReg, int returnAddressSize ) : CallSite
stackReg Identifier An identifier for the stack register of the processor.
returnAddressSize int The size of the return address on stack.
return CallSite

OnProcedureEntered() public abstract method

public abstract OnProcedureEntered ( ) : void
return void

OnProcedureLeft() public abstract method

public abstract OnProcedureLeft ( FunctionType procedureSignature ) : void
procedureSignature FunctionType
return void

ProcessorState() public method

public ProcessorState ( ) : Reko.Core.Code
return Reko.Core.Code

ProcessorState() public method

public ProcessorState ( ProcessorState orig ) : Reko.Core.Code
orig ProcessorState
return Reko.Core.Code

RemoveExpressionUse() public method

public RemoveExpressionUse ( Expression expr ) : void
expr Expression
return void

RemoveIdentifierUse() public method

public RemoveIdentifierUse ( Identifier id ) : void
id Identifier
return void

SetInstructionPointer() public abstract method

public abstract SetInstructionPointer ( Address addr ) : void
addr Address
return void

SetRegister() public abstract method

public abstract SetRegister ( RegisterStorage r, Constant v ) : void
r RegisterStorage
v Constant
return void

SetValue() public method

public SetValue ( RegisterStorage reg, Expression value ) : Constant
reg RegisterStorage
value Expression
return Constant

SetValue() public method

public SetValue ( Identifier id, Expression value ) : void
id Identifier
value Expression
return void

SetValueEa() public method

public SetValueEa ( Expression ea, Expression value ) : void
ea Expression
value Expression
return void

SetValueEa() public method

public SetValueEa ( Expression basePtr, Expression ea, Expression value ) : void
basePtr Expression
ea Expression
value Expression
return void

UseExpression() public method

public UseExpression ( Expression expr ) : void
expr Expression
return void