Function die_in_range

Source
pub fn die_in_range<'a, R>(
    dwarf: &'a Dwarf<R>,
    unit: &'a Unit<R>,
    die: &DebuggingInformationEntry<'_, '_, R>,
    pc: u32,
) -> Option<bool>
where R: Reader<Offset = usize>,
Expand description

Check if the given address is withing a DIEs address range.

Description:

  • dwarf - A reference to gimli-rs Dwarf struct.
  • unit - A reference to a gimli-rs Unit struct, which contains the DIE to check.
  • die - A reference to a gimli-rs Die struct that will be checked.
  • pc - A 32 bit machine code address, which is most commonly the current program counter value.

It checks if the given address is within the address range of the given DIE. If the address is in range it will return Some(true), otherwise it will return Some(false). If the DIE has no address ranges it will return None.