Struct gimli::read::RangeLists [−][src]
pub struct RangeLists<R> { /* fields omitted */ }The DWARF data found in .debug_ranges and .debug_rnglists sections.
Implementations
impl<R> RangeLists<R>[src]
impl<R> RangeLists<R>[src]pub fn new(
debug_ranges: DebugRanges<R>,
debug_rnglists: DebugRngLists<R>
) -> RangeLists<R>[src]
debug_ranges: DebugRanges<R>,
debug_rnglists: DebugRngLists<R>
) -> RangeLists<R>
Construct a new RangeLists instance from the data in the .debug_ranges and
.debug_rnglists sections.
impl<T> RangeLists<T>[src]
impl<T> RangeLists<T>[src]pub fn borrow<'a, F, R>(&'a self, borrow: F) -> RangeLists<R> where
F: FnMut(&'a T) -> R, [src]
F: FnMut(&'a T) -> R,
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(§ion, gimli::LittleEndian) });
impl<R: Reader> RangeLists<R>[src]
impl<R: Reader> RangeLists<R>[src]pub fn ranges(
&self,
offset: RangeListsOffset<R::Offset>,
unit_encoding: Encoding,
base_address: u64,
debug_addr: &DebugAddr<R>,
debug_addr_base: DebugAddrBase<R::Offset>
) -> Result<RngListIter<R>>[src]
&self,
offset: RangeListsOffset<R::Offset>,
unit_encoding: Encoding,
base_address: u64,
debug_addr: &DebugAddr<R>,
debug_addr_base: DebugAddrBase<R::Offset>
) -> Result<RngListIter<R>>
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.
pub fn raw_ranges(
&self,
offset: RangeListsOffset<R::Offset>,
unit_encoding: Encoding
) -> Result<RawRngListIter<R>>[src]
&self,
offset: RangeListsOffset<R::Offset>,
unit_encoding: Encoding
) -> Result<RawRngListIter<R>>
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.
pub fn get_offset(
&self,
unit_encoding: Encoding,
base: DebugRngListsBase<R::Offset>,
index: DebugRngListsIndex<R::Offset>
) -> Result<RangeListsOffset<R::Offset>>[src]
&self,
unit_encoding: Encoding,
base: DebugRngListsBase<R::Offset>,
index: DebugRngListsIndex<R::Offset>
) -> Result<RangeListsOffset<R::Offset>>
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.
pub fn lookup_offset_id(
&self,
id: ReaderOffsetId
) -> Option<(SectionId, R::Offset)>[src]
&self,
id: ReaderOffsetId
) -> Option<(SectionId, R::Offset)>
Call Reader::lookup_offset_id for each section, and return the first match.
Trait Implementations
impl<R: Clone> Clone for RangeLists<R>[src]
impl<R: Clone> Clone for RangeLists<R>[src]fn clone(&self) -> RangeLists<R>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<R: Default> Default for RangeLists<R>[src]
impl<R: Default> Default for RangeLists<R>[src]fn default() -> RangeLists<R>[src]
impl<R: Copy> Copy for RangeLists<R>[src]
Auto Trait Implementations
impl<R> RefUnwindSafe for RangeLists<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> Send for RangeLists<R> where
R: Send,
R: Send,
impl<R> Sync for RangeLists<R> where
R: Sync,
R: Sync,
impl<R> Unpin for RangeLists<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for RangeLists<R> where
R: UnwindSafe,
R: UnwindSafe,