[−][src]Struct gimli::read::LocationLists
The DWARF data found in .debug_loc
and .debug_loclists
sections.
Implementations
impl<R> LocationLists<R>
[src]
pub fn new(
debug_loc: DebugLoc<R>,
debug_loclists: DebugLocLists<R>
) -> LocationLists<R>
[src]
debug_loc: DebugLoc<R>,
debug_loclists: DebugLocLists<R>
) -> LocationLists<R>
Construct a new LocationLists
instance from the data in the .debug_loc
and
.debug_loclists
sections.
impl<T> LocationLists<T>
[src]
pub fn borrow<'a, F, R>(&'a self, borrow: F) -> LocationLists<R> where
F: FnMut(&'a T) -> R,
[src]
F: FnMut(&'a T) -> R,
Create a LocationLists
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::LocationLists<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> LocationLists<R>
[src]
pub fn locations(
&self,
offset: LocationListsOffset<R::Offset>,
unit_encoding: Encoding,
base_address: u64,
debug_addr: &DebugAddr<R>,
debug_addr_base: DebugAddrBase<R::Offset>
) -> Result<LocListIter<R>>
[src]
&self,
offset: LocationListsOffset<R::Offset>,
unit_encoding: Encoding,
base_address: u64,
debug_addr: &DebugAddr<R>,
debug_addr_base: DebugAddrBase<R::Offset>
) -> Result<LocListIter<R>>
Iterate over the LocationListEntry
s starting at the given offset.
The unit_encoding
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 location
list.
Can be used with
FallibleIterator
.
pub fn raw_locations(
&self,
offset: LocationListsOffset<R::Offset>,
unit_encoding: Encoding
) -> Result<RawLocListIter<R>>
[src]
&self,
offset: LocationListsOffset<R::Offset>,
unit_encoding: Encoding
) -> Result<RawLocListIter<R>>
Iterate over the raw LocationListEntry
s 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 location entries, such as handling base addresses.
Can be used with
FallibleIterator
.
pub fn get_offset(
&self,
unit_encoding: Encoding,
base: DebugLocListsBase<R::Offset>,
index: DebugLocListsIndex<R::Offset>
) -> Result<LocationListsOffset<R::Offset>>
[src]
&self,
unit_encoding: Encoding,
base: DebugLocListsBase<R::Offset>,
index: DebugLocListsIndex<R::Offset>
) -> Result<LocationListsOffset<R::Offset>>
Returns the .debug_loclists
offset at the given base
and index
.
The base
must be the DW_AT_loclists_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_loclistx
attribute.
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 LocationLists<R>
[src]
fn clone(&self) -> LocationLists<R>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<R: Copy> Copy for LocationLists<R>
[src]
impl<R: Debug> Debug for LocationLists<R>
[src]
impl<R: Default> Default for LocationLists<R>
[src]
fn default() -> LocationLists<R>
[src]
Auto Trait Implementations
impl<R> Send for LocationLists<R> where
R: Send,
R: Send,
impl<R> Sync for LocationLists<R> where
R: Sync,
R: Sync,
impl<R> Unpin for LocationLists<R> where
R: 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,
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.
fn to_owned(&self) -> T
[src]
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.
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>,