Trait symbolic_debuginfo::dwarf::Dwarf[][src]

pub trait Dwarf<'data> {
    fn endianity(&self) -> Endian;
fn raw_section(&self, name: &str) -> Option<DwarfSection<'data>>; fn section(&self, name: &str) -> Option<DwarfSection<'data>> { ... }
fn has_section(&self, name: &str) -> bool { ... } }

Provides access to DWARF debugging information independent of the container file type.

When implementing this trait, verify whether the container file type supports compressed section data. If so, override the provided section_data method. Also, if there is a faster way to check for the existence of a section without loading its data, override has_section.

Required methods

fn endianity(&self) -> Endian[src]

Returns whether the file was compiled for a big-endian or little-endian machine.

This can usually be determined by inspecting the file’s headers. Sometimes, this is also given by the architecture.

fn raw_section(&self, name: &str) -> Option<DwarfSection<'data>>[src]

Returns information and raw data of a section.

The section name is given without leading punctuation, such dots or underscores. For instance, the name of the Debug Info section would be "debug_info", which translates to ".debug_info" in ELF and "__debug_info" in MachO.

Certain containers might allow compressing section data. In this case, this function returns the compressed data. To get uncompressed data instead, use section_data.

Loading content...

Provided methods

fn section(&self, name: &str) -> Option<DwarfSection<'data>>[src]

Returns information and data of a section.

If the section is compressed, this decompresses on the fly and returns allocated memory. Otherwise, this should return a slice of the raw data.

The section name is given without leading punctuation, such dots or underscores. For instance, the name of the Debug Info section would be "debug_info", which translates to ".debug_info" in ELF and "__debug_info" in MachO.

fn has_section(&self, name: &str) -> bool[src]

Determines whether the specified section exists.

The section name is given without leading punctuation, such dots or underscores. For instance, the name of the Debug Info section would be "debug_info", which translates to ".debug_info" in ELF and "__debug_info" in MachO.

Loading content...

Implementors

impl<'d> Dwarf<'d> for WasmObject<'d>[src]

impl<'data> Dwarf<'data> for ElfObject<'data>[src]

impl<'data> Dwarf<'data> for MachObject<'data>[src]

Loading content...