pub fn evaluate<R: Reader<Offset = usize>, T: MemoryAccess>(
dwarf: &Dwarf<R>,
unit: &Unit<R>,
pc: u32,
expr: Expression<R>,
frame_base: Option<u64>,
type_unit: Option<&Unit<R>>,
type_die: Option<&DebuggingInformationEntry<'_, '_, R>>,
registers: &Registers,
mem: &mut T,
) -> Result<EvaluatorValue<R>>Expand description
Will evaluate the value of the given DWARF expression.
Description:
dwarf- A reference to gimli-rsDwarfstruct.unit- A compilation unit which contains the given DIE.pc- A machine code address, usually the current code location.expr- The expression to be evaluated.frame_base- The frame base address value.type_unit- A compilation unit which contains the given DIE which represents the type of the given expression. None if the expression does not have a type.type_die- The DIE the represents the type of the given expression. None if the expression does not have a type.registers- A register struct for accessing the register values.mem- A struct for accessing the memory of the debug target.
This function will first evaluate the expression into gimli-rs Pieces.
Then it will use the pieces and the type too evaluate and parse the value.