pub struct LineProgramHeader<R, Offset = <R as Reader>::Offset> where
    R: Reader<Offset = Offset>,
    Offset: ReaderOffset
{ /* private fields */ }
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

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 version of 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.

Whether this line program is encoded in 64- or 32-bit DWARF.

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

pub fn directory_entry_format(&self) -> &[FileEntryFormat]

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.

pub fn file_name_entry_format(&self) -> &[FileEntryFormat]

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.