gimli::read

Type Alias IncompleteLineNumberProgram

Source
pub type IncompleteLineNumberProgram<R, Offset> = IncompleteLineProgram<R, Offset>;
👎Deprecated: IncompleteLineNumberProgram has been renamed to IncompleteLineProgram, use that instead.
Expand description

Deprecated. IncompleteLineNumberProgram has been renamed to IncompleteLineProgram.

Aliased Type§

struct IncompleteLineNumberProgram<R, Offset> {
    header: LineProgramHeader<R, Offset>,
}

Fields§

§header: LineProgramHeader<R, Offset>

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,