Struct gimli::DebugInfo [] [src]

pub struct DebugInfo<'input, Endian> where Endian: Endianity {
    // some fields omitted
}

The DebugInfo struct represents the DWARF debugging information found in the .debug_info section.

Methods

impl<'input, Endian> DebugInfo<'input, Endian> where Endian: Endianity
[src]

Construct a new DebugInfo instance from the data in the .debug_info section.

It is the caller's responsibility to read the .debug_info 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::{DebugInfo, LittleEndian};

let debug_info = DebugInfo::<LittleEndian>::new(read_debug_info_section_somehow());

Iterate the compilation- and partial-units in this .debug_info section.

use gimli::{DebugInfo, LittleEndian};

let debug_info = DebugInfo::<LittleEndian>::new(read_debug_info_section_somehow());

let mut iter = debug_info.units();
while let Some(unit) = iter.next().unwrap() {
    println!("unit's length is {}", unit.unit_length());
}

Can be used with FallibleIterator.

Get the UnitHeader located at offset from this .debug_info section.

Trait Implementations

impl<'input, Endian: Copy> Copy for DebugInfo<'input, Endian> where Endian: Endianity
[src]

impl<'input, Endian: Clone> Clone for DebugInfo<'input, Endian> where Endian: Endianity
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'input, Endian: Debug> Debug for DebugInfo<'input, Endian> where Endian: Endianity
[src]

Formats the value using the given formatter.