pub enum EvaluatorValue<R: Reader<Offset = usize>> {
Show 14 variants
Value(BaseTypeValue, ValueInformation),
PointerTypeValue(Box<PointerTypeValue<R>>),
VariantValue(Box<VariantValue<R>>),
VariantPartValue(Box<VariantPartValue<R>>),
SubrangeTypeValue(SubrangeTypeValue),
Bytes(R),
Array(Box<ArrayTypeValue<R>>),
Struct(Box<StructureTypeValue<R>>),
Enum(Box<EnumerationTypeValue<R>>),
Union(Box<UnionTypeValue<R>>),
Member(Box<MemberValue<R>>),
OptimizedOut,
LocationOutOfRange,
ZeroSize,
}Expand description
Describes all the different Rust types values in the form of a tree structure.
Variants§
Value(BaseTypeValue, ValueInformation)
A base_type type and value with location information.
PointerTypeValue(Box<PointerTypeValue<R>>)
A pointer_type type and value.
VariantValue(Box<VariantValue<R>>)
A variant type and value.
VariantPartValue(Box<VariantPartValue<R>>)
A variant_part type and value.
SubrangeTypeValue(SubrangeTypeValue)
A subrange_type type and value.
Bytes(R)
gimli-rs bytes value.
Array(Box<ArrayTypeValue<R>>)
A array type value.
Struct(Box<StructureTypeValue<R>>)
A struct type value.
Enum(Box<EnumerationTypeValue<R>>)
A enum type value.
Union(Box<UnionTypeValue<R>>)
A union type value.
Member(Box<MemberValue<R>>)
A attribute type value.
OptimizedOut
The value is optimized away.
LocationOutOfRange
The variable has no location currently but had or will have one. Note that the location can be a constant stored in the DWARF stack.
ZeroSize
The value is size 0 bits.
Implementations§
Source§impl<R: Reader<Offset = usize>> EvaluatorValue<R>
impl<R: Reader<Offset = usize>> EvaluatorValue<R>
Sourcepub fn to_value(self) -> Option<BaseTypeValue>
pub fn to_value(self) -> Option<BaseTypeValue>
Will return this value as a BaseTypeValue struct if possible.
Sourcepub fn get_variable_information(self) -> Vec<ValueInformation>
pub fn get_variable_information(self) -> Vec<ValueInformation>
Will return a Vec of location and unparsed value infromation about the value.
Sourcepub fn evaluate_variable_with_type<M: MemoryAccess>(
dwarf: &Dwarf<R>,
registers: &Registers,
mem: &mut M,
pieces: &[Piece<R>],
unit_offset: UnitSectionOffset,
die_offset: UnitOffset,
) -> Result<EvaluatorValue<R>>
pub fn evaluate_variable_with_type<M: MemoryAccess>( dwarf: &Dwarf<R>, registers: &Registers, mem: &mut M, pieces: &[Piece<R>], unit_offset: UnitSectionOffset, die_offset: UnitOffset, ) -> Result<EvaluatorValue<R>>
Evaluate a list of Pieces into a value and parse it to the given type.
Description:
dwarf- A reference to gimli-rsDwarfstruct.registers- A register struct for accessing the register values.mem- A struct for accessing the memory of the debug target.pieces- A list of gimli-rs pieces containing the location information..unit_offset- A offset to theUnitwhich contains the given type DIE.die_offset- A offset to the DIE that contains the type of the value.
This function will use the location information in the pieces parameter to read the
values and parse it to the given type.
Sourcepub fn evaluate_variable<M: MemoryAccess>(
registers: &Registers,
mem: &mut M,
pieces: &[Piece<R>],
) -> Result<EvaluatorValue<R>>
pub fn evaluate_variable<M: MemoryAccess>( registers: &Registers, mem: &mut M, pieces: &[Piece<R>], ) -> Result<EvaluatorValue<R>>
This function will evaluate the given pieces into a unsigned 32 bit integer.
Description:
registers- A register struct for accessing the register values.mem- A struct for accessing the memory of the debug target.pieces- A list of gimli-rs pieces containing the location information..
Trait Implementations§
Source§impl<R: Clone + Reader<Offset = usize>> Clone for EvaluatorValue<R>
impl<R: Clone + Reader<Offset = usize>> Clone for EvaluatorValue<R>
Source§fn clone(&self) -> EvaluatorValue<R>
fn clone(&self) -> EvaluatorValue<R>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more