Struct gimli::read::LineProgramHeader [−][src]
A header for a line number program in the .debug_line
section, as defined
in section 6.2.4 of the standard.
Implementations
impl<R, Offset> LineProgramHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
pub fn offset(&self) -> DebugLineOffset<R::Offset>
[src]
Return the offset of the line number program header in the .debug_line
section.
pub fn unit_length(&self) -> R::Offset
[src]
Return the length of the line number program and header, not including the length of the encoded length itself.
pub fn encoding(&self) -> Encoding
[src]
Return the encoding parameters for this header’s line program.
pub fn version(&self) -> u16
[src]
Get the version of this header’s line program.
pub fn header_length(&self) -> R::Offset
[src]
Get the length of the encoded line number program header, not including the length of the encoded length itself.
pub fn address_size(&self) -> u8
[src]
Get the size in bytes of a target machine address.
pub fn format(&self) -> Format
[src]
Whether this line program is encoded in 64- or 32-bit DWARF.
pub fn line_encoding(&self) -> LineEncoding
[src]
Get the line encoding parameters for this header’s line program.
pub fn minimum_instruction_length(&self) -> u8
[src]
Get the minimum instruction length any instruction in this header’s line program may have.
pub fn maximum_operations_per_instruction(&self) -> u8
[src]
Get the maximum number of operations each instruction in this header’s line program may have.
pub fn default_is_stmt(&self) -> bool
[src]
Get the default value of the is_stmt
register for this header’s line
program.
pub fn line_base(&self) -> i8
[src]
Get the line base for this header’s line program.
pub fn line_range(&self) -> u8
[src]
Get the line range for this header’s line program.
pub fn opcode_base(&self) -> u8
[src]
Get opcode base for this header’s line program.
pub fn standard_opcode_lengths(&self) -> &R
[src]
An array of u8
that specifies the number of LEB128 operands for
each of the standard opcodes.
pub fn directory_entry_format(&self) -> &[FileEntryFormat]
[src]
Get the format of a directory entry.
pub fn include_directories(&self) -> &[AttributeValue<R, Offset>]
[src]
Get the set of include directories for this header’s line program.
For DWARF version <= 4, the compilation’s current directory is not included in the return value, but is implicitly considered to be in the set per spec.
pub fn directory(&self, directory: u64) -> Option<AttributeValue<R, Offset>>
[src]
The include directory with the given directory index.
A directory index of 0 corresponds to the compilation unit directory.
pub fn file_name_entry_format(&self) -> &[FileEntryFormat]
[src]
Get the format of a file name entry.
pub fn file_has_timestamp(&self) -> bool
[src]
Return true if the file entries may have valid timestamps.
Only returns false if we definitely know that all timestamp fields are invalid.
pub fn file_has_size(&self) -> bool
[src]
Return true if the file entries may have valid sizes.
Only returns false if we definitely know that all size fields are invalid.
pub fn file_has_md5(&self) -> bool
[src]
Return true if the file name entry format contains an MD5 field.
pub fn file_names(&self) -> &[FileEntry<R, Offset>]
[src]
Get the list of source files that appear in this header’s line program.
pub fn file(&self, file: u64) -> Option<&FileEntry<R, Offset>>
[src]
The source file with the given file index.
A file index of 0 corresponds to the compilation unit file. Note that a file index of 0 is invalid for DWARF version <= 4, but we support it anyway.
pub fn raw_program_buf(&self) -> R
[src]
Get the raw, un-parsed EndianSlice
containing this header’s line number
program.
use gimli::{LineProgramHeader, EndianSlice, NativeEndian}; fn get_line_number_program_header<'a>() -> LineProgramHeader<EndianSlice<'a, NativeEndian>> { // Get a line number program header from some offset in a // `.debug_line` section... } let header = get_line_number_program_header(); let raw_program = header.raw_program_buf(); println!("The length of the raw program in bytes is {}", raw_program.len());
pub fn instructions(&self) -> LineInstructions<R>
[src]
Iterate over the instructions in this header’s line number program, parsing them as we go.
Trait Implementations
impl<R: Clone, Offset: Clone> Clone for LineProgramHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
fn clone(&self) -> LineProgramHeader<R, Offset>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<R: Debug, Offset: Debug> Debug for LineProgramHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: Eq, Offset: Eq> Eq for LineProgramHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: PartialEq, Offset: PartialEq> PartialEq<LineProgramHeader<R, Offset>> for LineProgramHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
fn eq(&self, other: &LineProgramHeader<R, Offset>) -> bool
[src]
fn ne(&self, other: &LineProgramHeader<R, Offset>) -> bool
[src]
impl<R, Offset> StructuralEq for LineProgramHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R, Offset> StructuralPartialEq for LineProgramHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
Auto Trait Implementations
impl<R, Offset> Send for LineProgramHeader<R, Offset> where
Offset: Send,
R: Send,
Offset: Send,
R: Send,
impl<R, Offset> Sync for LineProgramHeader<R, Offset> where
Offset: Sync,
R: Sync,
Offset: Sync,
R: Sync,
impl<R, Offset> Unpin for LineProgramHeader<R, Offset> where
Offset: Unpin,
R: Unpin,
Offset: Unpin,
R: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,