Skip to main content

EmulatorErrorKind

Enum EmulatorErrorKind 

Source
pub enum EmulatorErrorKind {
Show 18 variants InvalidBlockAddress(u64), EmptyFunctionRoot(FunctionId), UnresolvedMintedCallee(u32), UnknownAddress(u64), AddressOverflow(u64, usize), MemoryReadError(u64), MemoryWriteError(u64), ValueError(u128), UnknownRegister(RegisterId), UnknownSpace(MemorySpaceId), UnsupportedPCodeOp(Box<str>), Interrupt, UnsupportedIntrinsic(Box<str>), InterceptError(Box<str>), StepBudgetExceeded(usize), UnsupportedMnemonic(&'static str), EmptyBlock(BlockId), PoisonRead,
}

Variants§

§

InvalidBlockAddress(u64)

Branch/call/return resolved to an address with no known block

§

EmptyFunctionRoot(FunctionId)

Called a function that has no root block

§

UnresolvedMintedCallee(u32)

A pass-local minted callee escaped its installation barrier.

§

UnknownAddress(u64)

run_until was given an address with no corresponding block

§

AddressOverflow(u64, usize)

Attempted to construct a memory region that would overflow the address space

§

MemoryReadError(u64)

Attempted to read memory at an address that hasn’t been written to

§

MemoryWriteError(u64)

Attempted to write to an address that can’t be read back (e.g. MMIO)

§

ValueError(u128)

This value is too large to be represented in the target type (e.g. trying to interpret a 128-bit value as a 64-bit value)

§

UnknownRegister(RegisterId)

Attempted to access a register that is not present in the context

§

UnknownSpace(MemorySpaceId)

Attempted to read from a memory space that has not been initialised

§

UnsupportedPCodeOp(Box<str>)

Encountered an architecture-specific p-code operation without an emulator implementation

§

Interrupt

Execution reached a vm.interrupt op: the machine stopped at it, on purpose, for the host to act. Not a failure; the VM turns it into a resumable exit.

§

UnsupportedIntrinsic(Box<str>)

An intrinsic’s evaluator could not produce a result (e.g. a trap or unsupported operand width)

§

InterceptError(Box<str>)

A user-provided call interceptor failed while modeling a call

§

StepBudgetExceeded(usize)

A bounded emulation run (e.g. run_pure) exceeded its step budget.

§

UnsupportedMnemonic(&'static str)

A mnemonic the interpreter does not model (e.g. map, whose whole-array emulation is deferred). Recoverable: a best-effort consumer such as pure-call folding simply declines to harvest, rather than crashing.

§

EmptyBlock(BlockId)

Execution reached a block with no instructions (a malformed/degenerate block left behind by lifting). Recoverable: bounded consumers decline to harvest rather than indexing out of bounds.

§

PoisonRead

A poison value was demanded as a concrete datum. Poison has undefined bits, so reading it is a hard error (argpromote v2); propagating it as an unread operand is fine. Bounded consumers (e.g. pure-call folding) treat this as a bail signal.

Trait Implementations§

Source§

impl Debug for EmulatorErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for EmulatorErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.