Struct gimli::StateMachine [] [src]

pub struct StateMachine<'input, 'header, Endian> where Endian: 'header + Endianity, 'input: 'header {
    // some fields omitted
}

Executes a LineNumberProgram to recreate the matrix mapping to and from instructions to source locations.

"The hypothetical machine used by a consumer of the line number information to expand the byte-coded instruction stream into a matrix of line number information." -- Section 6.2.1

Methods

impl<'input, 'header, Endian> StateMachine<'input, 'header, Endian> where Endian: Endianity
[src]

fn new(header: &'header LineNumberProgramHeader<'input, Endian>) -> Self

Construct a new StateMachine for executing line programs and generating the line information matrix.

impl<'input, 'header, Endian> StateMachine<'input, 'header, Endian> where Endian: 'header + Endianity, 'input: 'header
[src]

fn next_row(&mut self) -> ParseResult<Option<&LineNumberRow<'input, 'header, Endian>>>

Parse and execute the next opcodes in the line number program until another row in the line number matrix is computed.

The freshly computed row is returned as Ok(Some(row)). If the matrix is complete, and there are no more new rows in the line number matrix, then Ok(None) is returned. If there was an error parsing an opcode, then Err(e) is returned.

Trait Implementations

impl<'input, 'header, Endian: Debug> Debug for StateMachine<'input, 'header, Endian> where Endian: 'header + Endianity, 'input: 'header
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.