pub enum EvaluationResult<R: Reader> {
    Complete,
    RequiresMemory {
        address: u64,
        size: u8,
        space: Option<u64>,
        base_type: UnitOffset<R::Offset>,
    },
    RequiresRegister {
        register: Register,
        base_type: UnitOffset<R::Offset>,
    },
    RequiresFrameBase,
    RequiresTls(u64),
    RequiresCallFrameCfa,
    RequiresAtLocation(DieReference<R::Offset>),
    RequiresEntryValue(Expression<R>),
    RequiresParameterRef(UnitOffset<R::Offset>),
    RequiresRelocatedAddress(u64),
    RequiresIndexedAddress {
        index: DebugAddrIndex<R::Offset>,
        relocate: bool,
    },
    RequiresBaseType(UnitOffset<R::Offset>),
}
Expand description

The state of an Evaluation after evaluating a DWARF expression. The evaluation is either Complete, or it requires more data to continue, as described by the variant.

Variants§

§

Complete

The Evaluation is complete, and Evaluation::result() can be called.

§

RequiresMemory

Fields

§address: u64

The address of the value required.

§size: u8

The size of the value required. This is guaranteed to be at most the word size of the target architecture.

§space: Option<u64>

If not None, a target-specific address space value.

§base_type: UnitOffset<R::Offset>

The DIE of the base type or 0 to indicate the generic type

The Evaluation needs a value from memory to proceed further. Once the caller determines what value to provide it should resume the Evaluation by calling Evaluation::resume_with_memory.

§

RequiresRegister

Fields

§register: Register

The register number.

§base_type: UnitOffset<R::Offset>

The DIE of the base type or 0 to indicate the generic type

The Evaluation needs a value from a register to proceed further. Once the caller determines what value to provide it should resume the Evaluation by calling Evaluation::resume_with_register.

§

RequiresFrameBase

The Evaluation needs the frame base address to proceed further. Once the caller determines what value to provide it should resume the Evaluation by calling Evaluation::resume_with_frame_base. The frame base address is the address produced by the location description in the DW_AT_frame_base attribute of the current function.

§

RequiresTls(u64)

The Evaluation needs a value from TLS to proceed further. Once the caller determines what value to provide it should resume the Evaluation by calling Evaluation::resume_with_tls.

§

RequiresCallFrameCfa

The Evaluation needs the CFA to proceed further. Once the caller determines what value to provide it should resume the Evaluation by calling Evaluation::resume_with_call_frame_cfa.

§

RequiresAtLocation(DieReference<R::Offset>)

The Evaluation needs the DWARF expression at the given location to proceed further. Once the caller determines what value to provide it should resume the Evaluation by calling Evaluation::resume_with_at_location.

§

RequiresEntryValue(Expression<R>)

The Evaluation needs the value produced by evaluating a DWARF expression at the entry point of the current subprogram. Once the caller determines what value to provide it should resume the Evaluation by calling Evaluation::resume_with_entry_value.

§

RequiresParameterRef(UnitOffset<R::Offset>)

The Evaluation needs the value of the parameter at the given location in the current function’s caller. Once the caller determines what value to provide it should resume the Evaluation by calling Evaluation::resume_with_parameter_ref.

§

RequiresRelocatedAddress(u64)

The Evaluation needs an address to be relocated to proceed further. Once the caller determines what value to provide it should resume the Evaluation by calling Evaluation::resume_with_relocated_address.

§

RequiresIndexedAddress

Fields

§index: DebugAddrIndex<R::Offset>

The index of the address in the .debug_addr section, relative to the DW_AT_addr_base of the compilation unit.

§relocate: bool

Whether the address also needs to be relocated.

The Evaluation needs an address from the .debug_addr section. This address may also need to be relocated. Once the caller determines what value to provide it should resume the Evaluation by calling Evaluation::resume_with_indexed_address.

§

RequiresBaseType(UnitOffset<R::Offset>)

The Evaluation needs the ValueType for the base type DIE at the give unit offset. Once the caller determines what value to provide it should resume the Evaluation by calling Evaluation::resume_with_base_type.

Trait Implementations§

source§

impl<R: Debug + Reader> Debug for EvaluationResult<R>where R::Offset: Debug,

source§

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

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

impl<R: PartialEq + Reader> PartialEq<EvaluationResult<R>> for EvaluationResult<R>where R::Offset: PartialEq,

source§

fn eq(&self, other: &EvaluationResult<R>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<R: Reader> StructuralPartialEq for EvaluationResult<R>

Auto Trait Implementations§

§

impl<R> RefUnwindSafe for EvaluationResult<R>where R: RefUnwindSafe, <R as Reader>::Offset: RefUnwindSafe,

§

impl<R> Send for EvaluationResult<R>where R: Send, <R as Reader>::Offset: Send,

§

impl<R> Sync for EvaluationResult<R>where R: Sync, <R as Reader>::Offset: Sync,

§

impl<R> Unpin for EvaluationResult<R>where R: Unpin, <R as Reader>::Offset: Unpin,

§

impl<R> UnwindSafe for EvaluationResult<R>where R: UnwindSafe, <R as Reader>::Offset: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.