Struct gimli::DebugLoc
[−]
[src]
pub struct DebugLoc<'input, Endian> where
Endian: Endianity, { /* fields omitted */ }
The DebugLoc
struct represents the DWARF strings
found in the .debug_loc
section.
Methods
impl<'input, Endian> DebugLoc<'input, Endian> where
Endian: Endianity,
[src]
Endian: Endianity,
fn new(debug_loc_section: &'input [u8]) -> DebugLoc<'input, Endian>
Construct a new DebugLoc
instance from the data in the .debug_loc
section.
It is the caller's responsibility to read the .debug_loc
section and
present it as a &[u8]
slice. That means using some ELF loader on
Linux, a Mach-O loader on OSX, etc.
use gimli::{DebugLoc, LittleEndian}; let debug_loc = DebugLoc::<LittleEndian>::new(read_debug_loc_section_somehow());
fn locations(
&self,
offset: DebugLocOffset,
address_size: u8,
base_address: u64
) -> Result<LocationListIter<'input, Endian>>
&self,
offset: DebugLocOffset,
address_size: u8,
base_address: u64
) -> Result<LocationListIter<'input, Endian>>
Iterate over the LocationListEntry
s starting at the given offset.
The address_size
must be match the compilation unit for this location list.
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
.
fn raw_locations(
&self,
offset: DebugLocOffset,
address_size: u8
) -> Result<RawLocationListIter<'input, Endian>>
&self,
offset: DebugLocOffset,
address_size: u8
) -> Result<RawLocationListIter<'input, Endian>>
Iterate over the raw LocationListEntry
s starting at the given offset.
The address_size
must be match the compilation unit for this location list.
This iterator does not perform any processing of the location entries, such as handling base addresses.
Can be used with
FallibleIterator
.
Trait Implementations
impl<'input, Endian: Debug> Debug for DebugLoc<'input, Endian> where
Endian: Endianity,
[src]
Endian: Endianity,
impl<'input, Endian: Clone> Clone for DebugLoc<'input, Endian> where
Endian: Endianity,
[src]
Endian: Endianity,
fn clone(&self) -> DebugLoc<'input, Endian>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'input, Endian: Copy> Copy for DebugLoc<'input, Endian> where
Endian: Endianity,
[src]
Endian: Endianity,
impl<'input, Endian> Section<'input> for DebugLoc<'input, Endian> where
Endian: Endianity,
[src]
Endian: Endianity,
fn section_name() -> &'static str
Returns the ELF section name for this type.
impl<'input, Endian> From<&'input [u8]> for DebugLoc<'input, Endian> where
Endian: Endianity,
[src]
Endian: Endianity,