Function find_variable_location

Source
pub fn find_variable_location<R: Reader<Offset = usize>>(
    dwarf: &Dwarf<R>,
    unit: &Unit<R>,
    die: &DebuggingInformationEntry<'_, '_, R>,
    address: u32,
) -> Result<VariableLocation<R>>
Expand description

Find the location of a variable.

Description:

  • dwarf - A reference to gimli-rs Dwarf struct.
  • unit - A reference to gimli-rs Unit struct which contains the given DIE.
  • die - A reference to the variables DIE that contains the location.
  • address - A address that will be used to find the location, this is most often the current machine code address.

Will get the location for the given address from the attribute DW_AT_location in the variable DIE.