Struct symbolic::debuginfo::dwarf::gimli::DebugTypes [−]
pub struct DebugTypes<R> { /* fields omitted */ }
The DebugTypes
struct represents the DWARF type information
found in the .debug_types
section.
Implementations
impl<'input, Endian> DebugTypes<EndianSlice<'input, Endian>> where
Endian: Endianity,
impl<'input, Endian> DebugTypes<EndianSlice<'input, Endian>> where
Endian: Endianity,
pub fn new(
debug_types_section: &'input [u8],
endian: Endian
) -> DebugTypes<EndianSlice<'input, Endian>>
debug_types_section: &'input [u8],
endian: Endian
) -> DebugTypes<EndianSlice<'input, Endian>>
Construct a new DebugTypes
instance from the data in the .debug_types
section.
It is the caller’s responsibility to read the .debug_types
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::{DebugTypes, LittleEndian}; let debug_types = DebugTypes::new(read_debug_types_section_somehow(), LittleEndian);
impl<T> DebugTypes<T>
impl<T> DebugTypes<T>
pub fn borrow<'a, F, R>(&'a self, borrow: F) -> DebugTypes<R> where
F: FnMut(&'a T) -> R,
F: FnMut(&'a T) -> R,
Create a DebugTypes
section that references the data in self
.
This is useful when R
implements Reader
but T
does not.
Example Usage
// Read the DWARF section into a `Vec` with whatever object loader you're using. let owned_section: gimli::DebugTypes<Vec<u8>> = load_section(); // Create a reference to the DWARF section. let section = owned_section.borrow(|section| { gimli::EndianSlice::new(§ion, gimli::LittleEndian) });
impl<R> DebugTypes<R> where
R: Reader,
impl<R> DebugTypes<R> where
R: Reader,
pub fn units(&self) -> DebugTypesUnitHeadersIter<R>
Iterate the type-units in this .debug_types
section.
use gimli::{DebugTypes, LittleEndian}; let debug_types = DebugTypes::new(read_debug_types_section_somehow(), LittleEndian); let mut iter = debug_types.units(); while let Some(unit) = iter.next().unwrap() { println!("unit's length is {}", unit.unit_length()); }
Can be used with
FallibleIterator
.
Trait Implementations
impl<R> Clone for DebugTypes<R> where
R: Clone,
impl<R> Clone for DebugTypes<R> where
R: Clone,
pub fn clone(&self) -> DebugTypes<R>
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<R> Copy for DebugTypes<R> where
R: Copy,
impl<R> Copy for DebugTypes<R> where
R: Copy,
impl<R> Debug for DebugTypes<R> where
R: Debug,
impl<R> Debug for DebugTypes<R> where
R: Debug,
impl<R> Default for DebugTypes<R> where
R: Default,
impl<R> Default for DebugTypes<R> where
R: Default,
pub fn default() -> DebugTypes<R>
impl<R> From<R> for DebugTypes<R>
impl<R> From<R> for DebugTypes<R>
pub fn from(debug_types_section: R) -> DebugTypes<R>
impl<R> Section<R> for DebugTypes<R>
impl<R> Section<R> for DebugTypes<R>
pub fn id() -> SectionId
pub fn reader(&self) -> &R
pub fn section_name() -> &'static str
pub fn dwo_section_name() -> Option<&'static str>
pub fn load<F, E>(f: F) -> Result<Self, E> where
F: FnOnce(SectionId) -> Result<R, E>,
F: FnOnce(SectionId) -> Result<R, E>,
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,
Auto Trait Implementations
impl<R> RefUnwindSafe for DebugTypes<R> where
R: RefUnwindSafe,
impl<R> RefUnwindSafe for DebugTypes<R> where
R: RefUnwindSafe,
impl<R> Send for DebugTypes<R> where
R: Send,
impl<R> Send for DebugTypes<R> where
R: Send,
impl<R> Sync for DebugTypes<R> where
R: Sync,
impl<R> Sync for DebugTypes<R> where
R: Sync,
impl<R> Unpin for DebugTypes<R> where
R: Unpin,
impl<R> Unpin for DebugTypes<R> where
R: Unpin,
impl<R> UnwindSafe for DebugTypes<R> where
R: UnwindSafe,
impl<R> UnwindSafe for DebugTypes<R> where
R: UnwindSafe,