Struct gimli::DebugInfo
[−]
[src]
pub struct DebugInfo<'input, Endian> where Endian: Endianity { /* 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) -> CompilationUnitHeadersIter<'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)
-> Result<CompilationUnitHeader<'input, Endian>>
offset: DebugInfoOffset)
-> Result<CompilationUnitHeader<'input, Endian>>
Get the CompilationUnitHeader located at offset from this .debug_info section.
Trait Implementations
impl<'input, Endian: Debug> Debug 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: Copy> Copy for DebugInfo<'input, Endian> where Endian: Endianity
[src]
impl<'input, Endian> Section<'input> for DebugInfo<'input, Endian> where Endian: Endianity
[src]
fn section_name() -> &'static str
Returns the ELF section name for this type.