Struct gimli::DebugFrame [−][src]
pub struct DebugFrame<R: Reader>(_);
DebugFrame contains the .debug_frame section's frame unwinding
information required to unwind to and recover registers from older frames on
the stack. For example, this is useful for a debugger that wants to print
locals in a backtrace.
Most interesting methods are defined in the
UnwindSection trait.
Differences between .debug_frame and .eh_frame
While the .debug_frame section's information has a lot of overlap with the
.eh_frame section's information, the .eh_frame information tends to only
encode the subset of information needed for exception handling. Often, only
one of .eh_frame or .debug_frame will be present in an object file.
Methods
impl<'input, Endian> DebugFrame<EndianSlice<'input, Endian>> where
Endian: Endianity, [src]
impl<'input, Endian> DebugFrame<EndianSlice<'input, Endian>> where
Endian: Endianity, pub fn new(section: &'input [u8], endian: Endian) -> Self[src]
pub fn new(section: &'input [u8], endian: Endian) -> SelfConstruct a new DebugFrame instance from the data in the
.debug_frame section.
It is the caller's responsibility to read the 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::{DebugFrame, NativeEndian}; // Use with `.debug_frame` let debug_frame = DebugFrame::new(read_debug_frame_section_somehow(), NativeEndian);
Trait Implementations
impl<R: Clone + Reader> Clone for DebugFrame<R>[src]
impl<R: Clone + Reader> Clone for DebugFrame<R>fn clone(&self) -> DebugFrame<R>[src]
fn clone(&self) -> DebugFrame<R>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<R: Copy + Reader> Copy for DebugFrame<R>[src]
impl<R: Copy + Reader> Copy for DebugFrame<R>impl<R: Debug + Reader> Debug for DebugFrame<R>[src]
impl<R: Debug + Reader> Debug for DebugFrame<R>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<R: PartialEq + Reader> PartialEq for DebugFrame<R>[src]
impl<R: PartialEq + Reader> PartialEq for DebugFrame<R>fn eq(&self, other: &DebugFrame<R>) -> bool[src]
fn eq(&self, other: &DebugFrame<R>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &DebugFrame<R>) -> bool[src]
fn ne(&self, other: &DebugFrame<R>) -> boolThis method tests for !=.
impl<R: Eq + Reader> Eq for DebugFrame<R>[src]
impl<R: Eq + Reader> Eq for DebugFrame<R>impl<R: Reader> Section<R> for DebugFrame<R>[src]
impl<R: Reader> Section<R> for DebugFrame<R>fn section_name() -> &'static str[src]
fn section_name() -> &'static strReturns the ELF section name for this type.
impl<R: Reader> From<R> for DebugFrame<R>[src]
impl<R: Reader> From<R> for DebugFrame<R>impl<R: Reader> UnwindSection<R> for DebugFrame<R>[src]
impl<R: Reader> UnwindSection<R> for DebugFrame<R>type Offset = DebugFrameOffset<R::Offset>
The offset type associated with this CFI section. Either DebugFrameOffset or EhFrameOffset. Read more
fn entries<'bases>(
&self,
bases: &'bases BaseAddresses
) -> CfiEntriesIter<'bases, Self, R>[src]
fn entries<'bases>(
&self,
bases: &'bases BaseAddresses
) -> CfiEntriesIter<'bases, Self, R>Iterate over the CommonInformationEntrys and FrameDescriptionEntrys in this .debug_frame section. Read more
fn cie_from_offset<'bases>(
&self,
bases: &'bases BaseAddresses,
offset: Self::Offset
) -> Result<CommonInformationEntry<Self, R, R::Offset>>[src]
fn cie_from_offset<'bases>(
&self,
bases: &'bases BaseAddresses,
offset: Self::Offset
) -> Result<CommonInformationEntry<Self, R, R::Offset>>Parse the CommonInformationEntry at the given offset.
fn unwind_info_for_address<'bases>(
&self,
bases: &'bases BaseAddresses,
ctx: UninitializedUnwindContext<Self, R>,
address: u64
) -> UnwindResult<(UnwindTableRow<R>, UninitializedUnwindContext<Self, R>), UninitializedUnwindContext<Self, R>>[src]
fn unwind_info_for_address<'bases>(
&self,
bases: &'bases BaseAddresses,
ctx: UninitializedUnwindContext<Self, R>,
address: u64
) -> UnwindResult<(UnwindTableRow<R>, UninitializedUnwindContext<Self, R>), UninitializedUnwindContext<Self, R>>Find the frame unwind information for the given address. Read more
Auto Trait Implementations
impl<R> Send for DebugFrame<R> where
R: Send,
impl<R> Send for DebugFrame<R> where
R: Send, impl<R> Sync for DebugFrame<R> where
R: Sync,
impl<R> Sync for DebugFrame<R> where
R: Sync,