pub struct RangeLists<R> { /* private fields */ }
Expand description

The DWARF data found in .debug_ranges and .debug_rnglists sections.

Implementations

Construct a new RangeLists instance from the data in the .debug_ranges and .debug_rnglists sections.

Return the .debug_ranges section.

Replace the .debug_ranges section.

This is useful for .dwo files when using the GNU split-dwarf extension to DWARF 4.

Return the .debug_rnglists section.

Create a RangeLists that references the data in self.

This is useful when R implements Reader but T does not.

Example Usage
// Read the DWARF section into a `Vec` with whatever object loader you're using.
let owned_section: gimli::RangeLists<Vec<u8>> = load_section();
// Create a reference to the DWARF section.
let section = owned_section.borrow(|section| {
    gimli::EndianSlice::new(&section, gimli::LittleEndian)
});

Iterate over the Range list entries starting at the given offset.

The unit_version and address_size must match the compilation unit that the offset was contained in.

The base_address should be obtained from the DW_AT_low_pc attribute in the DW_TAG_compile_unit entry for the compilation unit that contains this range list.

Can be used with FallibleIterator.

Iterate over the RawRngListEntryies starting at the given offset.

The unit_encoding must match the compilation unit that the offset was contained in.

This iterator does not perform any processing of the range entries, such as handling base addresses.

Can be used with FallibleIterator.

Returns the .debug_rnglists offset at the given base and index.

The base must be the DW_AT_rnglists_base value from the compilation unit DIE. This is an offset that points to the first entry following the header.

The index is the value of a DW_FORM_rnglistx attribute.

The unit_encoding must match the compilation unit that the index was contained in.

Call Reader::lookup_offset_id for each section, and return the first match.

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

Returns the “default value” for a type. Read more

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.