pub struct LineRow { /* private fields */ }
Expand description
A row in the line number program’s resulting matrix.
Each row is a copy of the registers of the state machine, as defined in section 6.2.2.
Implementations§
source§impl LineRow
impl LineRow
sourcepub fn new<R: Reader>(header: &LineProgramHeader<R>) -> Self
pub fn new<R: Reader>(header: &LineProgramHeader<R>) -> Self
Create a line number row in the initial state for the given program.
sourcepub fn address(&self) -> u64
pub fn address(&self) -> u64
“The program-counter value corresponding to a machine instruction generated by the compiler.”
sourcepub fn op_index(&self) -> u64
pub fn op_index(&self) -> u64
An unsigned integer representing the index of an operation within a VLIW instruction. The index of the first operation is 0. For non-VLIW architectures, this register will always be 0.
The address and op_index registers, taken together, form an operation pointer that can reference any individual operation with the instruction stream.
sourcepub fn file_index(&self) -> u64
pub fn file_index(&self) -> u64
“An unsigned integer indicating the identity of the source file corresponding to a machine instruction.”
sourcepub fn file<'header, R: Reader>(
&self,
header: &'header LineProgramHeader<R>,
) -> Option<&'header FileEntry<R>>
pub fn file<'header, R: Reader>( &self, header: &'header LineProgramHeader<R>, ) -> Option<&'header FileEntry<R>>
The source file corresponding to the current machine instruction.
sourcepub fn line(&self) -> Option<NonZeroU64>
pub fn line(&self) -> Option<NonZeroU64>
“An unsigned integer indicating a source line number. Lines are numbered
beginning at 1. The compiler may emit the value 0 in cases where an
instruction cannot be attributed to any source line.”
Line number values of 0 are represented as None
.
sourcepub fn column(&self) -> ColumnType
pub fn column(&self) -> ColumnType
“An unsigned integer indicating a column number within a source line. Columns are numbered beginning at 1. The value 0 is reserved to indicate that a statement begins at the “left edge” of the line.”
sourcepub fn is_stmt(&self) -> bool
pub fn is_stmt(&self) -> bool
“A boolean indicating that the current instruction is a recommended breakpoint location. A recommended breakpoint location is intended to “represent” a line, a statement and/or a semantically distinct subpart of a statement.”
sourcepub fn basic_block(&self) -> bool
pub fn basic_block(&self) -> bool
“A boolean indicating that the current instruction is the beginning of a basic block.”
sourcepub fn end_sequence(&self) -> bool
pub fn end_sequence(&self) -> bool
“A boolean indicating that the current address is that of the first byte after the end of a sequence of target machine instructions. end_sequence terminates a sequence of lines; therefore other information in the same row is not meaningful.”
sourcepub fn prologue_end(&self) -> bool
pub fn prologue_end(&self) -> bool
“A boolean indicating that the current address is one (of possibly many) where execution should be suspended for an entry breakpoint of a function.”
sourcepub fn epilogue_begin(&self) -> bool
pub fn epilogue_begin(&self) -> bool
“A boolean indicating that the current address is one (of possibly many) where execution should be suspended for an exit breakpoint of a function.”
sourcepub fn isa(&self) -> u64
pub fn isa(&self) -> u64
Tag for the current instruction set architecture.
An unsigned integer whose value encodes the applicable instruction set architecture for the current instruction.
The encoding of instruction sets should be shared by all users of a given architecture. It is recommended that this encoding be defined by the ABI authoring committee for each architecture.
sourcepub fn discriminator(&self) -> u64
pub fn discriminator(&self) -> u64
“An unsigned integer identifying the block to which the current instruction belongs. Discriminator values are assigned arbitrarily by the DWARF producer and serve to distinguish among multiple blocks that may all be associated with the same source file, line, and column. Where only one block exists for a given source position, the discriminator value should be zero.”
sourcepub fn execute<R, Program>(
&mut self,
instruction: LineInstruction<R>,
program: &mut Program,
) -> boolwhere
Program: LineProgram<R>,
R: Reader,
pub fn execute<R, Program>(
&mut self,
instruction: LineInstruction<R>,
program: &mut Program,
) -> boolwhere
Program: LineProgram<R>,
R: Reader,
Execute the given instruction, and return true if a new row in the line number matrix needs to be generated.
Unknown opcodes are treated as no-ops.
sourcepub fn reset<R: Reader>(&mut self, header: &LineProgramHeader<R>)
pub fn reset<R: Reader>(&mut self, header: &LineProgramHeader<R>)
Perform any reset that was required after copying the previous row.