Trait gimli::Section
[−]
[src]
pub trait Section<'input>: From<&'input [u8]> { fn section_name() -> &'static str; }
A convenience trait for loading DWARF sections from object files. To be used like:
use gimli::{DebugInfo, LittleEndian, Section}; fn load_section<'a, S, F>(loader: F) -> S where S: Section<'a>, F: FnOnce(&'static str) -> &'a [u8] { let data = loader(S::section_name()); S::from(data) } let buf = [0x00, 0x01, 0x02, 0x03]; let debug_info: DebugInfo<LittleEndian> = load_section(|_: &'static str| &buf);
Required Methods
fn section_name() -> &'static str
Returns the ELF section name for this type.
Implementors
impl<'input, Endian> Section<'input> for DebugFrame<'input, Endian> where
Endian: Endianity,impl<'input, Endian> Section<'input> for EhFrame<'input, Endian> where
Endian: Endianity,impl<'input, Endian> Section<'input> for DebugAbbrev<'input, Endian> where
Endian: Endianity,impl<'input, Endian> Section<'input> for DebugAranges<'input, Endian> where
Endian: Endianity,impl<'input, Endian> Section<'input> for DebugLine<'input, Endian> where
Endian: Endianity,impl<'input, Endian> Section<'input> for DebugLoc<'input, Endian> where
Endian: Endianity,impl<'input, Endian> Section<'input> for DebugPubNames<'input, Endian> where
Endian: Endianity,impl<'input, Endian> Section<'input> for DebugPubTypes<'input, Endian> where
Endian: Endianity,impl<'input, Endian> Section<'input> for DebugRanges<'input, Endian> where
Endian: Endianity,impl<'input, Endian> Section<'input> for DebugStr<'input, Endian> where
Endian: Endianity,impl<'input, Endian> Section<'input> for DebugInfo<'input, Endian> where
Endian: Endianity,