Struct gimli::read::LineRow

source ·
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

source

pub fn new<R: Reader>(header: &LineProgramHeader<R>) -> Self

Create a line number row in the initial state for the given program.

source

pub fn address(&self) -> u64

“The program-counter value corresponding to a machine instruction generated by the compiler.”

source

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.

source

pub fn file_index(&self) -> u64

“An unsigned integer indicating the identity of the source file corresponding to a machine instruction.”

source

pub fn file<'header, R: Reader>( &self, header: &'header LineProgramHeader<R> ) -> Option<&'header FileEntry<R>>

The source file corresponding to the current machine instruction.

source

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.

source

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.”

source

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.”

source

pub fn basic_block(&self) -> bool

“A boolean indicating that the current instruction is the beginning of a basic block.”

source

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.”

source

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.”

source

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.”

source

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.

source

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.”

source

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.

source

pub fn reset<R: Reader>(&mut self, header: &LineProgramHeader<R>)

Perform any reset that was required after copying the previous row.

Trait Implementations§

source§

impl Clone for LineRow

source§

fn clone(&self) -> LineRow

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 Debug for LineRow

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq<LineRow> for LineRow

source§

fn eq(&self, other: &LineRow) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for LineRow

source§

impl Eq for LineRow

source§

impl StructuralEq for LineRow

source§

impl StructuralPartialEq for LineRow

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.