Struct gimli::read::DwarfPackage
source · [−]pub struct DwarfPackage<R: Reader> {
pub cu_index: UnitIndex<R>,
pub tu_index: UnitIndex<R>,
pub debug_abbrev: DebugAbbrev<R>,
pub debug_info: DebugInfo<R>,
pub debug_line: DebugLine<R>,
pub debug_str: DebugStr<R>,
pub debug_str_offsets: DebugStrOffsets<R>,
pub debug_loc: DebugLoc<R>,
pub debug_loclists: DebugLocLists<R>,
pub debug_rnglists: DebugRngLists<R>,
pub debug_types: DebugTypes<R>,
pub empty: R,
}
Expand description
The sections from a .dwp
file.
Fields
cu_index: UnitIndex<R>
The compilation unit index in the .debug_cu_index
section.
tu_index: UnitIndex<R>
The type unit index in the .debug_tu_index
section.
debug_abbrev: DebugAbbrev<R>
The .debug_abbrev.dwo
section.
debug_info: DebugInfo<R>
The .debug_info.dwo
section.
debug_line: DebugLine<R>
The .debug_line.dwo
section.
debug_str: DebugStr<R>
The .debug_str.dwo
section.
debug_str_offsets: DebugStrOffsets<R>
The .debug_str_offsets.dwo
section.
debug_loc: DebugLoc<R>
The .debug_loc.dwo
section.
Only present when using GNU split-dwarf extension to DWARF 4.
debug_loclists: DebugLocLists<R>
The .debug_loclists.dwo
section.
debug_rnglists: DebugRngLists<R>
The .debug_rnglists.dwo
section.
debug_types: DebugTypes<R>
The .debug_types.dwo
section.
Only present when using GNU split-dwarf extension to DWARF 4.
empty: R
An empty section.
Used when creating Dwarf<R>
.
Implementations
sourceimpl<R: Reader> DwarfPackage<R>
impl<R: Reader> DwarfPackage<R>
sourcepub fn load<F, E>(section: F, empty: R) -> Result<Self, E> where
F: FnMut(SectionId) -> Result<R, E>,
E: From<Error>,
pub fn load<F, E>(section: F, empty: R) -> Result<Self, E> where
F: FnMut(SectionId) -> Result<R, E>,
E: From<Error>,
Try to load the .dwp
sections using the given loader function.
section
loads a DWARF section from the object file.
It should return an empty section if the section does not exist.
sourcepub fn find_cu(&self, id: DwoId, parent: &Dwarf<R>) -> Result<Option<Dwarf<R>>>
pub fn find_cu(&self, id: DwoId, parent: &Dwarf<R>) -> Result<Option<Dwarf<R>>>
Find the compilation unit with the given DWO identifier and return its section contributions.
sourcepub fn find_tu(
&self,
signature: DebugTypeSignature,
parent: &Dwarf<R>
) -> Result<Option<Dwarf<R>>>
pub fn find_tu(
&self,
signature: DebugTypeSignature,
parent: &Dwarf<R>
) -> Result<Option<Dwarf<R>>>
Find the type unit with the given type signature and return its section contributions.
sourcepub fn cu_sections(&self, index: u32, parent: &Dwarf<R>) -> Result<Dwarf<R>>
pub fn cu_sections(&self, index: u32, parent: &Dwarf<R>) -> Result<Dwarf<R>>
Return the section contributions of the compilation unit at the given index.
The index must be in the range 1..cu_index.unit_count
.
This function should only be needed by low level parsers.
Trait Implementations
Auto Trait Implementations
impl<R> RefUnwindSafe for DwarfPackage<R> where
R: RefUnwindSafe,
impl<R> Send for DwarfPackage<R> where
R: Send,
impl<R> Sync for DwarfPackage<R> where
R: Sync,
impl<R> Unpin for DwarfPackage<R> where
R: Unpin,
impl<R> UnwindSafe for DwarfPackage<R> where
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more