Struct gimli::write::FrameTable

source ·
pub struct FrameTable { /* private fields */ }
Expand description

A table of frame description entries.

Implementations§

source§

impl FrameTable

source

pub fn from<R, Section>( frame: &Section, convert_address: &dyn Fn(u64) -> Option<Address> ) -> ConvertResult<FrameTable>
where R: Reader<Offset = usize>, Section: UnwindSection<R>, Section::Offset: UnwindOffset<usize>,

Create a frame table by reading the data in the given section.

convert_address is a function to convert read addresses into the Address type. For non-relocatable addresses, this function may simply return Address::Constant(address). For relocatable addresses, it is the caller’s responsibility to determine the symbol and addend corresponding to the address and return Address::Symbol { symbol, addend }.

source§

impl FrameTable

source

pub fn add_cie(&mut self, cie: CommonInformationEntry) -> CieId

Add a CIE and return its id.

If the CIE already exists, then return the id of the existing CIE.

source

pub fn cie_count(&self) -> usize

The number of CIEs.

source

pub fn add_fde(&mut self, cie: CieId, fde: FrameDescriptionEntry)

Add a FDE.

Does not check for duplicates.

§Panics

Panics if the CIE id is invalid.

source

pub fn fde_count(&self) -> usize

The number of FDEs.

source

pub fn write_debug_frame<W: Writer>(&self, w: &mut DebugFrame<W>) -> Result<()>

Write the frame table entries to the given .debug_frame section.

source

pub fn write_eh_frame<W: Writer>(&self, w: &mut EhFrame<W>) -> Result<()>

Write the frame table entries to the given .eh_frame section.

Trait Implementations§

source§

impl Debug for FrameTable

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FrameTable

source§

fn default() -> FrameTable

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.