Struct debug_info::DebugSections
source · pub struct DebugSections { /* private fields */ }
Expand description
The set of debug sections that we need to use from a crate object file.
All debug sections herein are contained within a single MappedPages
memory region.
Implementations§
source§impl DebugSections
impl DebugSections
sourcepub fn debug_str(&self) -> DebugStr<EndianSlice<'_, NativeEndian>>
pub fn debug_str(&self) -> DebugStr<EndianSlice<'_, NativeEndian>>
Returns the ".debug_str"
section.
sourcepub fn debug_loc(&self) -> Option<DebugLoc<EndianSlice<'_, NativeEndian>>>
pub fn debug_loc(&self) -> Option<DebugLoc<EndianSlice<'_, NativeEndian>>>
Returns the ".debug_loc"
section.
sourcepub fn debug_abbrev(&self) -> DebugAbbrev<EndianSlice<'_, NativeEndian>>
pub fn debug_abbrev(&self) -> DebugAbbrev<EndianSlice<'_, NativeEndian>>
Returns the ".debug_abbrev"
section.
sourcepub fn debug_info(&self) -> DebugInfo<EndianSlice<'_, NativeEndian>>
pub fn debug_info(&self) -> DebugInfo<EndianSlice<'_, NativeEndian>>
Returns the ".debug_info"
section.
sourcepub fn debug_ranges(&self) -> DebugRanges<EndianSlice<'_, NativeEndian>>
pub fn debug_ranges(&self) -> DebugRanges<EndianSlice<'_, NativeEndian>>
Returns the ".debug_ranges"
section.
sourcepub fn debug_pubnames(&self) -> DebugPubNames<EndianSlice<'_, NativeEndian>>
pub fn debug_pubnames(&self) -> DebugPubNames<EndianSlice<'_, NativeEndian>>
Returns the ".debug_pubnames"
section.
sourcepub fn debug_pubtypes(&self) -> DebugPubTypes<EndianSlice<'_, NativeEndian>>
pub fn debug_pubtypes(&self) -> DebugPubTypes<EndianSlice<'_, NativeEndian>>
Returns the ".debug_pubtypes"
section.
sourcepub fn debug_line(&self) -> DebugLine<EndianSlice<'_, NativeEndian>>
pub fn debug_line(&self) -> DebugLine<EndianSlice<'_, NativeEndian>>
Returns the ".debug_line"
section.
sourcepub fn find_subprogram_containing(
&self,
instruction_pointer: VirtualAddress
) -> Result<Option<DebugInfoOffset>>
pub fn find_subprogram_containing( &self, instruction_pointer: VirtualAddress ) -> Result<Option<DebugInfoOffset>>
Finds the subprogram that contains the given instruction pointer.
A subprogram is DWARF’s term for an executable function/method/closure/subroutine, which has a bounded range of program counters / instruction pointers that can be searched.
Return
Returns the offset into the DebugInfo
of the Debugging Information Entry (DIE) that describes the subprogram
that covers (includes) the virtual address of the given instruction_pointer
.
If a matching subprogram DIE is not found, Ok(None)
is returned.
Otherwise, an error is returned upon failure, e.g., a problem parsing the debug sections.