Type Definition gimli::DebugAranges [] [src]

type DebugAranges<'input, Endian> = DebugLookup<'input, Endian, ArangeParser<'input, Endian>>;

The DebugAranges struct represents the DWARF address range information found in the .debug_aranges section.

Provides:

  • new(input: EndianBuf<'input, Endian>) -> DebugAranges<'input, Endian>

    Construct a new DebugAranges instance from the data in the .debug_aranges section.

    It is the caller's responsibility to read the .debug_aranges section and present it as a &[u8] slice. That means using some ELF loader on Linux, a Mach-O loader on OSX, etc.

    use gimli::{DebugAranges, LittleEndian};
    
    let debug_aranges = DebugAranges::<LittleEndian>::new(read_debug_aranges_section());
  • items(&self) -> ArangeEntryIter<'input, Endian>

    Iterate the aranges in the .debug_aranges section.

    use gimli::{DebugAranges, LittleEndian};
    
    let debug_aranges = DebugAranges::<LittleEndian>::new(read_debug_aranges_section());
    
    let mut iter = debug_aranges.items();
    while let Some(arange) = iter.next().unwrap() {
      println!("arange starts at {}, has length {}", arange.address(), arange.length());
    }