[−]Struct symbolic::debuginfo::dwarf::gimli::read::DebugFrame
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.
Implementations
impl<R> DebugFrame<R> where
R: Reader,
R: Reader,
pub fn set_address_size(&mut self, address_size: u8)
Set the size of a target address in bytes.
This defaults to the native word size. This is only used if the CIE version is less than 4.
pub fn set_segment_size(&mut self, segment_size: u8)
Set the size of a segment selector in bytes.
This defaults to 0. This is only used if the CIE version is less than 4.
impl<'input, Endian> DebugFrame<EndianSlice<'input, Endian>> where
Endian: Endianity,
Endian: Endianity,
pub fn new(
section: &'input [u8],
endian: Endian
) -> DebugFrame<EndianSlice<'input, Endian>>
section: &'input [u8],
endian: Endian
) -> DebugFrame<EndianSlice<'input, Endian>>
Construct 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 for DebugFrame<R> where
R: Reader + Clone,
R: Reader + Clone,
pub fn clone(&self) -> DebugFrame<R>
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<R> Copy for DebugFrame<R> where
R: Reader + Copy,
R: Reader + Copy,
impl<R> Debug for DebugFrame<R> where
R: Reader + Debug,
R: Reader + Debug,
impl<R> Eq for DebugFrame<R> where
R: Reader + Eq,
R: Reader + Eq,
impl<R> From<R> for DebugFrame<R> where
R: Reader,
R: Reader,
pub fn from(section: R) -> DebugFrame<R>
impl<R> PartialEq<DebugFrame<R>> for DebugFrame<R> where
R: Reader + PartialEq<R>,
R: Reader + PartialEq<R>,
pub fn eq(&self, other: &DebugFrame<R>) -> bool
pub fn ne(&self, other: &DebugFrame<R>) -> bool
impl<R> Section<R> for DebugFrame<R> where
R: Reader,
R: Reader,
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,
impl<R> StructuralEq for DebugFrame<R> where
R: Reader,
R: Reader,
impl<R> StructuralPartialEq for DebugFrame<R> where
R: Reader,
R: Reader,
impl<R> UnwindSection<R> for DebugFrame<R> where
R: Reader,
R: Reader,
type Offset = DebugFrameOffset<<R as Reader>::Offset>
The offset type associated with this CFI section. Either
DebugFrameOffset
or EhFrameOffset
. Read more
pub fn entries(
&self,
bases: &'bases BaseAddresses
) -> CfiEntriesIter<'bases, Self, R>
&self,
bases: &'bases BaseAddresses
) -> CfiEntriesIter<'bases, Self, R>
pub fn cie_from_offset(
&self,
bases: &BaseAddresses,
offset: Self::Offset
) -> Result<CommonInformationEntry<R, <R as Reader>::Offset>, Error>
&self,
bases: &BaseAddresses,
offset: Self::Offset
) -> Result<CommonInformationEntry<R, <R as Reader>::Offset>, Error>
pub fn partial_fde_from_offset(
&self,
bases: &'bases BaseAddresses,
offset: Self::Offset
) -> Result<PartialFrameDescriptionEntry<'bases, Self, R>, Error>
&self,
bases: &'bases BaseAddresses,
offset: Self::Offset
) -> Result<PartialFrameDescriptionEntry<'bases, Self, R>, Error>
pub fn fde_from_offset<F>(
&self,
bases: &BaseAddresses,
offset: Self::Offset,
get_cie: F
) -> Result<FrameDescriptionEntry<R, <R as Reader>::Offset>, Error> where
F: FnMut(&Self, &BaseAddresses, Self::Offset) -> Result<CommonInformationEntry<R, <R as Reader>::Offset>, Error>,
&self,
bases: &BaseAddresses,
offset: Self::Offset,
get_cie: F
) -> Result<FrameDescriptionEntry<R, <R as Reader>::Offset>, Error> where
F: FnMut(&Self, &BaseAddresses, Self::Offset) -> Result<CommonInformationEntry<R, <R as Reader>::Offset>, Error>,
pub fn fde_for_address<F>(
&self,
bases: &BaseAddresses,
address: u64,
get_cie: F
) -> Result<FrameDescriptionEntry<R, <R as Reader>::Offset>, Error> where
F: FnMut(&Self, &BaseAddresses, Self::Offset) -> Result<CommonInformationEntry<R, <R as Reader>::Offset>, Error>,
&self,
bases: &BaseAddresses,
address: u64,
get_cie: F
) -> Result<FrameDescriptionEntry<R, <R as Reader>::Offset>, Error> where
F: FnMut(&Self, &BaseAddresses, Self::Offset) -> Result<CommonInformationEntry<R, <R as Reader>::Offset>, Error>,
pub fn unwind_info_for_address<F>(
&self,
bases: &BaseAddresses,
ctx: &mut UninitializedUnwindContext<R>,
address: u64,
get_cie: F
) -> Result<UnwindTableRow<R>, Error> where
F: FnMut(&Self, &BaseAddresses, Self::Offset) -> Result<CommonInformationEntry<R, <R as Reader>::Offset>, Error>,
&self,
bases: &BaseAddresses,
ctx: &mut UninitializedUnwindContext<R>,
address: u64,
get_cie: F
) -> Result<UnwindTableRow<R>, Error> where
F: FnMut(&Self, &BaseAddresses, Self::Offset) -> Result<CommonInformationEntry<R, <R as Reader>::Offset>, Error>,
Auto Trait Implementations
impl<R> RefUnwindSafe for DebugFrame<R> where
R: RefUnwindSafe,
[src]
R: RefUnwindSafe,
impl<R> Send for DebugFrame<R> where
R: Send,
[src]
R: Send,
impl<R> Sync for DebugFrame<R> where
R: Sync,
[src]
R: Sync,
impl<R> Unpin for DebugFrame<R> where
R: Unpin,
[src]
R: Unpin,
impl<R> UnwindSafe for DebugFrame<R> where
R: UnwindSafe,
[src]
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,