lief::dwarf

Enum Location

pub enum Location<'a> {
    Register(RegisterLocation<'a>),
    Address(AddressLocation<'a>),
    FrameBase(FrameBaseLocation<'a>),
    RegisterOffset(RegisterOffsetLocation<'a>),
    Expression(ExpressionLocation<'a>),
    Unavailable(UnavailableLocation<'a>),
    Composite(CompositeLocation<'a>),
    Unknown(UnknownLocation<'a>),
}
Expand description

Where the value of a variable or a parameter lives, as described by a DWARF location expression.

Variants§

§

Register(RegisterLocation<'a>)

The value is associated with a register (e.g. DW_OP_reg5)

§

Address(AddressLocation<'a>)

The value is located at a fixed memory address (e.g. DW_OP_addr)

§

FrameBase(FrameBaseLocation<'a>)

The value is located in memory at an offset of the frame base (e.g. DW_OP_fbreg)

§

RegisterOffset(RegisterOffsetLocation<'a>)

The value is located in memory at an offset of a register (e.g. DW_OP_breg7 +8)

§

Expression(ExpressionLocation<'a>)

A DWARF expression that is not evaluated by LIEF

§

Unavailable(UnavailableLocation<'a>)

The value is not available (e.g. optimized out)

§

Composite(CompositeLocation<'a>)

The value is split into several pieces (DW_OP_piece/DW_OP_bit_piece)

§

Unknown(UnknownLocation<'a>)

A location that is not recognized

Trait Implementations§

§

impl Display for Location<'_>

§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Location<'a>

§

impl<'a> RefUnwindSafe for Location<'a>

§

impl<'a> !Send for Location<'a>

§

impl<'a> !Sync for Location<'a>

§

impl<'a> Unpin for Location<'a>

§

impl<'a> UnwindSafe for Location<'a>

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 = 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 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.