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()); 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
.
fn header_from_offset(&self, offset: DebugInfoOffset) -> ParseResult<UnitHeader<'input, Endian>>
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]
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