pub enum EvaluationResult {
DirectValue(DirectValueResult),
MemoryLocation(LocationResult),
Optimized,
Composite(Vec<PieceResult>),
}Expand description
Result of evaluating a DWARF expression for eBPF code generation
Variants§
DirectValue(DirectValueResult)
Direct value - expression result is the variable value (no memory read needed)
MemoryLocation(LocationResult)
Memory location - expression result is an address that needs to be dereferenced
Optimized
Variable is optimized out (no location/value available)
Composite(Vec<PieceResult>)
Composite location (multiple pieces) - for split variables
Implementations§
Source§impl EvaluationResult
impl EvaluationResult
Sourcepub fn as_constant(&self) -> Option<i64>
pub fn as_constant(&self) -> Option<i64>
Check if this is a simple constant
Sourcepub fn merge_with_cfa(self, cfa: CfaResult, frame_offset: i64) -> Self
pub fn merge_with_cfa(self, cfa: CfaResult, frame_offset: i64) -> Self
Merge with CFA result for frame-relative addresses (DW_OP_fbreg) This is used when a variable location is relative to the frame base
Trait Implementations§
Source§impl Clone for EvaluationResult
impl Clone for EvaluationResult
Source§fn clone(&self) -> EvaluationResult
fn clone(&self) -> EvaluationResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EvaluationResult
impl Debug for EvaluationResult
Source§impl Display for EvaluationResult
impl Display for EvaluationResult
Source§impl PartialEq for EvaluationResult
impl PartialEq for EvaluationResult
impl StructuralPartialEq for EvaluationResult
Auto Trait Implementations§
impl Freeze for EvaluationResult
impl RefUnwindSafe for EvaluationResult
impl Send for EvaluationResult
impl Sync for EvaluationResult
impl Unpin for EvaluationResult
impl UnwindSafe for EvaluationResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more