Struct gimli::DebugFrame [] [src]

pub struct DebugFrame<'input, Endian>(_)
where
    Endian: Endianity
;

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<'input, Endian> where
    Endian: Endianity
[src]

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::<NativeEndian>::new(read_debug_frame_section_somehow());

Trait Implementations

impl<'input, Endian: Clone> Clone for DebugFrame<'input, Endian> where
    Endian: Endianity
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'input, Endian: Copy> Copy for DebugFrame<'input, Endian> where
    Endian: Endianity
[src]

impl<'input, Endian: Debug> Debug for DebugFrame<'input, Endian> where
    Endian: Endianity
[src]

Formats the value using the given formatter.

impl<'input, Endian: PartialEq> PartialEq for DebugFrame<'input, Endian> where
    Endian: Endianity
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'input, Endian: Eq> Eq for DebugFrame<'input, Endian> where
    Endian: Endianity
[src]

impl<'input, Endian> Section<'input> for DebugFrame<'input, Endian> where
    Endian: Endianity
[src]

Returns the ELF section name for this type.

impl<'input, Endian> From<&'input [u8]> for DebugFrame<'input, Endian> where
    Endian: Endianity
[src]

Performs the conversion.

impl<'input, Endian> UnwindSection<'input, Endian> for DebugFrame<'input, Endian> where
    Endian: Endianity
[src]

The offset type associated with this CFI section. Either DebugFrameOffset or EhFrameOffset. Read more

Construct a Self::Offset.

Iterate over the CommonInformationEntrys and FrameDescriptionEntrys in this .debug_frame section. Read more

Parse the CommonInformationEntry at the given offset.

Find the frame unwind information for the given address. Read more