[−]Trait symbolic::debuginfo::dwarf::gimli::Section
A convenience trait for loading DWARF sections from object files. To be used like:
use gimli::{DebugInfo, EndianSlice, LittleEndian, Reader, Section}; let buf = [0x00, 0x01, 0x02, 0x03]; let reader = EndianSlice::new(&buf, LittleEndian); let loader = |name| -> Result<_, ()> { Ok(reader) }; let debug_info: DebugInfo<_> = Section::load(loader).unwrap();
Required methods
pub fn id() -> SectionId
Returns the section id for this type.
pub fn reader(&self) -> &R where
R: Reader,
R: Reader,
Returns the Reader
for this section.
Provided methods
pub fn section_name() -> &'static str
Returns the ELF section name for this type.
pub fn dwo_section_name() -> Option<&'static str>
Returns the ELF section name (if any) for this type when used in a dwo file.
pub fn load<F, E>(f: F) -> Result<Self, E> where
F: FnOnce(SectionId) -> Result<R, E>,
F: FnOnce(SectionId) -> Result<R, E>,
Try to load the section using the given loader function.
pub fn lookup_offset_id(
&self,
id: ReaderOffsetId
) -> Option<(SectionId, <R as Reader>::Offset)> where
R: Reader,
&self,
id: ReaderOffsetId
) -> Option<(SectionId, <R as Reader>::Offset)> where
R: Reader,
Returns the Reader
for this section.
Implementors
impl<R> Section<R> for DebugAbbrev<R>
impl<R> Section<R> for DebugAddr<R>
impl<R> Section<R> for DebugAranges<R> where
R: Reader,
R: Reader,
impl<R> Section<R> for DebugFrame<R> where
R: Reader,
R: Reader,
impl<R> Section<R> for DebugInfo<R>
impl<R> Section<R> for DebugLine<R>
impl<R> Section<R> for DebugLineStr<R>
impl<R> Section<R> for DebugLoc<R>
impl<R> Section<R> for DebugLocLists<R>
impl<R> Section<R> for DebugPubNames<R> where
R: Reader,
R: Reader,
impl<R> Section<R> for DebugPubTypes<R> where
R: Reader,
R: Reader,
impl<R> Section<R> for DebugRanges<R>
impl<R> Section<R> for DebugRngLists<R>
impl<R> Section<R> for DebugStr<R>
impl<R> Section<R> for DebugStrOffsets<R>
impl<R> Section<R> for DebugTypes<R>
impl<R> Section<R> for EhFrame<R> where
R: Reader,
R: Reader,
impl<R> Section<R> for EhFrameHdr<R> where
R: Reader,
R: Reader,