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]

fn new(debug_info_section: &'input [u8]) -> DebugInfo<'input, Endian>

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());

fn units(&self) -> UnitHeadersIter<'input, Endian>

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());

for parse_result in debug_info.units() {
    let unit = parse_result.unwrap();
    println!("unit's length is {}", unit.unit_length());
}

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]

fn clone(&self) -> DebugInfo<'input, Endian>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

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

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.