Struct gimli::read::LineProgramHeader [−][src]
pub struct LineProgramHeader<R, Offset = <R as Reader>::Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset, { /* fields omitted */ }
Expand description
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,
impl<R, Offset> LineProgramHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
Return the offset of the line number program header in the .debug_line
section.
Return the length of the line number program and header, not including the length of the encoded length itself.
Return the encoding parameters for this header’s line program.
Get the length of the encoded line number program header, not including the length of the encoded length itself.
Get the size in bytes of a target machine address.
Get the line encoding parameters for this header’s line program.
Get the minimum instruction length any instruction in this header’s line program may have.
Get the maximum number of operations each instruction in this header’s line program may have.
Get the default value of the is_stmt
register for this header’s line
program.
Get the line range for this header’s line program.
Get opcode base for this header’s line program.
An array of u8
that specifies the number of LEB128 operands for
each of the standard opcodes.
Get the format of a directory entry.
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.
The include directory with the given directory index.
A directory index of 0 corresponds to the compilation unit directory.
Get the format of a file name entry.
Return true if the file entries may have valid timestamps.
Only returns false if we definitely know that all timestamp fields are invalid.
Return true if the file entries may have valid sizes.
Only returns false if we definitely know that all size fields are invalid.
Return true if the file name entry format contains an MD5 field.
Get the list of source files that appear in this header’s line program.
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.
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());
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,
impl<R: Clone, Offset: Clone> Clone for LineProgramHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: Debug, Offset: Debug> Debug for LineProgramHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: Debug, Offset: Debug> Debug for LineProgramHeader<R, Offset> where
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,
impl<R: PartialEq, Offset: PartialEq> PartialEq<LineProgramHeader<R, Offset>> for LineProgramHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl<R: Eq, Offset: Eq> Eq for LineProgramHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R, Offset> StructuralEq for LineProgramHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R, Offset> StructuralPartialEq for LineProgramHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
Auto Trait Implementations
impl<R, Offset> RefUnwindSafe for LineProgramHeader<R, Offset> where
Offset: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, Offset> Send for LineProgramHeader<R, Offset> where
Offset: Send,
R: Send,
impl<R, Offset> Sync for LineProgramHeader<R, Offset> where
Offset: Sync,
R: Sync,
impl<R, Offset> Unpin for LineProgramHeader<R, Offset> where
Offset: Unpin,
R: Unpin,
impl<R, Offset> UnwindSafe for LineProgramHeader<R, Offset> where
Offset: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more