Struct gimli::StateMachine
[−]
[src]
pub struct StateMachine<R, Program> where
Program: LineNumberProgram<R>,
R: Reader, { /* 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<R, Program> StateMachine<R, Program> where
Program: LineNumberProgram<R>,
R: Reader,
[src]
Program: LineNumberProgram<R>,
R: Reader,
fn header(&self) -> &LineNumberProgramHeader<R>
[src]
Get a reference to the header for this state machine's line number program.
fn next_row(
&mut self
) -> Result<Option<(&LineNumberProgramHeader<R>, &LineNumberRow)>>
[src]
&mut self
) -> Result<Option<(&LineNumberProgramHeader<R>, &LineNumberRow)>>
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((header, 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.
Unfortunately, the references mean that this cannot be a
FallibleIterator
.
fn run_to_address(
&mut self,
addr: &u64
) -> Result<Option<(&LineNumberProgramHeader<R>, &LineNumberRow)>>
[src]
&mut self,
addr: &u64
) -> Result<Option<(&LineNumberProgramHeader<R>, &LineNumberRow)>>
Parse and execute opcodes until we reach a row matching addr
, the end of the program,
or an error.
Trait Implementations
impl<R: Debug, Program: Debug> Debug for StateMachine<R, Program> where
Program: LineNumberProgram<R>,
R: Reader,
[src]
Program: LineNumberProgram<R>,
R: Reader,
impl<R: Clone, Program: Clone> Clone for StateMachine<R, Program> where
Program: LineNumberProgram<R>,
R: Reader,
[src]
Program: LineNumberProgram<R>,
R: Reader,
fn clone(&self) -> StateMachine<R, Program>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more