Table of Contents

Class EmptyUnknownResolver

Namespace
Echo.Platforms.AsmResolver.Emulation
Assembly
Echo.Platforms.AsmResolver.dll

Provides an implementation of the IUnknownResolver that reports back to the emulator that it should treat every unknown pointer or array access as an operation that is successful.

public class EmptyUnknownResolver : IUnknownResolver
Inheritance
EmptyUnknownResolver
Implements
Inherited Members

Properties

Instance

Gets the default instance of the EmptyUnknownResolver class.

public static EmptyUnknownResolver Instance { get; }

Property Value

EmptyUnknownResolver

Methods

ResolveArrayIndex(CilExecutionContext, CilInstruction, long, StackSlot)

Resolves an unknown index of an element within an array.

public virtual long? ResolveArrayIndex(CilExecutionContext context, CilInstruction instruction, long arrayAddress, StackSlot index)

Parameters

context CilExecutionContext

The context in which the instruction is executed in.

instruction CilInstruction

The switch instruction that is being executed.

arrayAddress long

The address of the array.

index StackSlot

The index to resolve.

Returns

long?

The resolved index, or null to treat it as an unknown value that is processed successfully.

ResolveBlockSize(CilExecutionContext, CilInstruction, StackSlot)

Resolves an unknown size for a memory block.

public virtual uint ResolveBlockSize(CilExecutionContext context, CilInstruction instruction, StackSlot size)

Parameters

context CilExecutionContext

The context in which the instruction is executed in.

instruction CilInstruction

The instruction that is being executed.

size StackSlot

The size to resolve.

Returns

uint

The resolved size, or null to treat it as an unknown value that is processed successfully.

ResolveBranchCondition(CilExecutionContext, CilInstruction, StackSlot)

Resolves an unknown condition value of a unary conditional branch instruction.

public virtual bool ResolveBranchCondition(CilExecutionContext context, CilInstruction instruction, StackSlot argument)

Parameters

context CilExecutionContext

The context in which the instruction is executed in.

instruction CilInstruction

The branch instruction that is being executed.

argument StackSlot

The condition to be resolved.

Returns

bool

true if the branch should be taken, false otherwise.

ResolveBranchCondition(CilExecutionContext, CilInstruction, StackSlot, StackSlot)

Resolves an unknown condition value of a binary conditional branch instruction.

public virtual bool ResolveBranchCondition(CilExecutionContext context, CilInstruction instruction, StackSlot argument1, StackSlot argument2)

Parameters

context CilExecutionContext

The context in which the instruction is executed in.

instruction CilInstruction

The branch instruction that is being executed.

argument1 StackSlot

The first argument.

argument2 StackSlot

The second argument.

Returns

bool

true if the branch should be taken, false otherwise.

ResolveDelegateTarget(CilExecutionContext, ObjectHandle, IList<BitVector>)

public virtual IMethodDescriptor? ResolveDelegateTarget(CilExecutionContext context, ObjectHandle delegateObject, IList<BitVector> arguments)

Parameters

context CilExecutionContext
delegateObject ObjectHandle
arguments IList<BitVector>

Returns

IMethodDescriptor

ResolveDestinationPointer(CilExecutionContext, CilInstruction, StackSlot)

Resolves an unknown destination address to a memory block or object to write data to.

public virtual long? ResolveDestinationPointer(CilExecutionContext context, CilInstruction instruction, StackSlot address)

Parameters

context CilExecutionContext

The context in which the instruction is executed in.

instruction CilInstruction

The instruction that is being executed.

address StackSlot

The address to resolve.

Returns

long?

The resolved address, or null to treat it as an unknown value that is processed successfully.

ResolveExceptionFilter(CilExecutionContext, CilInstruction, StackSlot)

Resolves an unknown conclusion for an exception filter.

public virtual bool ResolveExceptionFilter(CilExecutionContext context, CilInstruction instruction, StackSlot conclusion)

Parameters

context CilExecutionContext

The context in which the instruction is executed in.

instruction CilInstruction

The instruction that is being executed.

conclusion StackSlot

The unknown conclusion value.

Returns

bool

true if the exception should be handled, false otherwise.

ResolveMethod(CilExecutionContext, CilInstruction, IList<BitVector>)

Resolves a method devirtualization on an unknown object instance.

public virtual IMethodDescriptor? ResolveMethod(CilExecutionContext context, CilInstruction instruction, IList<BitVector> arguments)

Parameters

context CilExecutionContext

The context in which the instruction is executed in.

instruction CilInstruction

The instruction that is being executed.

arguments IList<BitVector>

Returns

IMethodDescriptor

The resolved method, or null if devirtualization should be ignored and the default implementation of the method should be used.

ResolveSourcePointer(CilExecutionContext, CilInstruction, StackSlot)

Resolves an unknown source address to a memory block or object to read data from.

public virtual long? ResolveSourcePointer(CilExecutionContext context, CilInstruction instruction, StackSlot address)

Parameters

context CilExecutionContext

The context in which the instruction is executed in.

instruction CilInstruction

The instruction that is being executed.

address StackSlot

The address to resolve.

Returns

long?

The resolved address, or null to treat it as an unknown value that is processed successfully.

ResolveSwitchCondition(CilExecutionContext, CilInstruction, StackSlot)

Resolves an unknown index value of a switch instruction.

public virtual uint? ResolveSwitchCondition(CilExecutionContext context, CilInstruction instruction, StackSlot argument)

Parameters

context CilExecutionContext

The context in which the instruction is executed in.

instruction CilInstruction

The switch instruction that is being executed.

argument StackSlot

The switch index to resolve.

Returns

uint?

The resolved index to jump to, or null to skip the switch instruction.