Struct gimli::read::IncompleteLineProgram

source ·
pub struct IncompleteLineProgram<R, Offset = <R as Reader>::Offset>
where R: Reader<Offset = Offset>, Offset: ReaderOffset,
{ /* private fields */ }
Expand description

A line number program that has not been run to completion.

Implementations§

source§

impl<R, Offset> IncompleteLineProgram<R, Offset>
where R: Reader<Offset = Offset>, Offset: ReaderOffset,

source

pub fn header(&self) -> &LineProgramHeader<R, Offset>

Retrieve the LineProgramHeader for this program.

source

pub fn rows(self) -> LineRows<R, IncompleteLineProgram<R, Offset>, Offset>

Construct a new LineRows for executing this program to iterate over rows in the line information matrix.

source

pub fn sequences( self, ) -> Result<(CompleteLineProgram<R, Offset>, Vec<LineSequence<R>>)>

Execute the line number program, completing the IncompleteLineProgram into a CompleteLineProgram and producing an array of sequences within the line number program that can later be used with CompleteLineProgram::resume_from.

use gimli::{IncompleteLineProgram, EndianSlice, NativeEndian};

fn get_line_number_program<'a>() -> IncompleteLineProgram<EndianSlice<'a, NativeEndian>> {
    // Get a line number program from some offset in a
    // `.debug_line` section...
}

let program = get_line_number_program();
let (program, sequences) = program.sequences().unwrap();
println!("There are {} sequences in this line number program", sequences.len());

Trait Implementations§

source§

impl<R, Offset> Clone for IncompleteLineProgram<R, Offset>
where R: Reader<Offset = Offset> + Clone, Offset: ReaderOffset + Clone,

source§

fn clone(&self) -> IncompleteLineProgram<R, Offset>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<R, Offset> Debug for IncompleteLineProgram<R, Offset>
where R: Reader<Offset = Offset> + Debug, Offset: ReaderOffset + Debug,

source§

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

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

impl<R, Offset> LineProgram<R, Offset> for IncompleteLineProgram<R, Offset>
where R: Reader<Offset = Offset>, Offset: ReaderOffset,

source§

fn header(&self) -> &LineProgramHeader<R, Offset>

Get a reference to the held LineProgramHeader.
source§

fn add_file(&mut self, file: FileEntry<R, Offset>)

Add a file to the file table if necessary.
source§

impl<R, Offset> PartialEq for IncompleteLineProgram<R, Offset>
where R: Reader<Offset = Offset> + PartialEq, Offset: ReaderOffset + PartialEq,

source§

fn eq(&self, other: &IncompleteLineProgram<R, Offset>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<R, Offset> Eq for IncompleteLineProgram<R, Offset>
where R: Reader<Offset = Offset> + Eq, Offset: ReaderOffset + Eq,

source§

impl<R, Offset> StructuralPartialEq for IncompleteLineProgram<R, Offset>
where R: Reader<Offset = Offset>, Offset: ReaderOffset,

Auto Trait Implementations§

§

impl<R, Offset> Freeze for IncompleteLineProgram<R, Offset>
where Offset: Freeze, R: Freeze,

§

impl<R, Offset> RefUnwindSafe for IncompleteLineProgram<R, Offset>
where Offset: RefUnwindSafe, R: RefUnwindSafe,

§

impl<R, Offset> Send for IncompleteLineProgram<R, Offset>
where Offset: Send, R: Send,

§

impl<R, Offset> Sync for IncompleteLineProgram<R, Offset>
where Offset: Sync, R: Sync,

§

impl<R, Offset> Unpin for IncompleteLineProgram<R, Offset>
where Offset: Unpin, R: Unpin,

§

impl<R, Offset> UnwindSafe for IncompleteLineProgram<R, Offset>
where Offset: UnwindSafe, R: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

source§

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>,

source§

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.