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]
impl<R, Program> StateMachine<R, Program> where
Program: LineNumberProgram<R>,
R: Reader,
pub fn header(&self) -> &LineNumberProgramHeader<R>
[src]
pub fn header(&self) -> &LineNumberProgramHeader<R>
Get a reference to the header for this state machine's line number program.
pub fn next_row(
&mut self
) -> Result<Option<(&LineNumberProgramHeader<R>, &LineNumberRow)>>
[src]
pub fn next_row(
&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
.
pub fn run_to_address(
&mut self,
addr: &u64
) -> Result<Option<(&LineNumberProgramHeader<R>, &LineNumberRow)>>
[src]
pub fn run_to_address(
&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]
impl<R: Debug, Program: Debug> Debug for StateMachine<R, Program> where
Program: LineNumberProgram<R>,
R: Reader,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<R: Clone, Program: Clone> Clone for StateMachine<R, Program> where
Program: LineNumberProgram<R>,
R: Reader,
[src]
impl<R: Clone, Program: Clone> Clone for StateMachine<R, Program> where
Program: LineNumberProgram<R>,
R: Reader,
fn clone(&self) -> StateMachine<R, Program>
[src]
fn clone(&self) -> StateMachine<R, Program>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<R, Program> Send for StateMachine<R, Program> where
Program: Send,
R: Send,
impl<R, Program> Send for StateMachine<R, Program> where
Program: Send,
R: Send,
impl<R, Program> Sync for StateMachine<R, Program> where
Program: Sync,
R: Sync,
impl<R, Program> Sync for StateMachine<R, Program> where
Program: Sync,
R: Sync,