[−][src]Struct gimli::read::UnitHeader
The common fields for the headers of compilation units and type units.
Implementations
impl<R, Offset> UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
Static methods.
pub fn new(
encoding: Encoding,
unit_length: R::Offset,
debug_abbrev_offset: DebugAbbrevOffset<R::Offset>,
entries_buf: R
) -> Self
[src]
encoding: Encoding,
unit_length: R::Offset,
debug_abbrev_offset: DebugAbbrevOffset<R::Offset>,
entries_buf: R
) -> Self
Construct a new UnitHeader
.
pub fn size_of_header(format: Format) -> usize
[src]
Return the serialized size of the common unit header for the given DWARF format.
impl<R, Offset> UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
Instance methods.
pub fn unit_length(&self) -> R::Offset
[src]
Get the length of the debugging info for this compilation unit, not including the byte length of the encoded length itself.
pub fn length_including_self(&self) -> R::Offset
[src]
Get the length of the debugging info for this compilation unit, including the byte length of the encoded length itself.
pub fn encoding(&self) -> Encoding
[src]
Return the encoding parameters for this unit.
pub fn version(&self) -> u16
[src]
Get the DWARF version of the debugging info for this compilation unit.
pub fn debug_abbrev_offset(&self) -> DebugAbbrevOffset<R::Offset>
[src]
The offset into the .debug_abbrev
section for this compilation unit's
debugging information entries' abbreviations.
pub fn address_size(&self) -> u8
[src]
The size of addresses (in bytes) in this compilation unit.
pub fn format(&self) -> Format
[src]
Whether this compilation unit is encoded in 64- or 32-bit DWARF.
pub fn header_size(&self) -> R::Offset
[src]
The serialized size of the header for this compilation unit.
pub fn range(&self, idx: Range<UnitOffset<R::Offset>>) -> Result<R>
[src]
Get the underlying bytes for the supplied range.
pub fn range_from(&self, idx: RangeFrom<UnitOffset<R::Offset>>) -> Result<R>
[src]
Get the underlying bytes for the supplied range.
pub fn range_to(&self, idx: RangeTo<UnitOffset<R::Offset>>) -> Result<R>
[src]
Get the underlying bytes for the supplied range.
pub fn entry<'me, 'abbrev>(
&'me self,
abbreviations: &'abbrev Abbreviations,
offset: UnitOffset<R::Offset>
) -> Result<DebuggingInformationEntry<'abbrev, 'me, R>>
[src]
&'me self,
abbreviations: &'abbrev Abbreviations,
offset: UnitOffset<R::Offset>
) -> Result<DebuggingInformationEntry<'abbrev, 'me, R>>
Read the DebuggingInformationEntry
at the given offset.
pub fn entries<'me, 'abbrev>(
&'me self,
abbreviations: &'abbrev Abbreviations
) -> EntriesCursor<'abbrev, 'me, R>
[src]
&'me self,
abbreviations: &'abbrev Abbreviations
) -> EntriesCursor<'abbrev, 'me, R>
Navigate this unit's DebuggingInformationEntry
s.
pub fn entries_at_offset<'me, 'abbrev>(
&'me self,
abbreviations: &'abbrev Abbreviations,
offset: UnitOffset<R::Offset>
) -> Result<EntriesCursor<'abbrev, 'me, R>>
[src]
&'me self,
abbreviations: &'abbrev Abbreviations,
offset: UnitOffset<R::Offset>
) -> Result<EntriesCursor<'abbrev, 'me, R>>
Navigate this compilation unit's DebuggingInformationEntry
s
starting at the given offset.
pub fn entries_tree<'me, 'abbrev>(
&'me self,
abbreviations: &'abbrev Abbreviations,
offset: Option<UnitOffset<R::Offset>>
) -> Result<EntriesTree<'abbrev, 'me, R>>
[src]
&'me self,
abbreviations: &'abbrev Abbreviations,
offset: Option<UnitOffset<R::Offset>>
) -> Result<EntriesTree<'abbrev, 'me, R>>
Navigate this unit's DebuggingInformationEntry
s as a tree
starting at the given offset.
pub fn entries_raw<'me, 'abbrev>(
&'me self,
abbreviations: &'abbrev Abbreviations,
offset: Option<UnitOffset<R::Offset>>
) -> Result<EntriesRaw<'abbrev, 'me, R>>
[src]
&'me self,
abbreviations: &'abbrev Abbreviations,
offset: Option<UnitOffset<R::Offset>>
) -> Result<EntriesRaw<'abbrev, 'me, R>>
Read the raw data that defines the Debugging Information Entries.
pub fn abbreviations(
&self,
debug_abbrev: &DebugAbbrev<R>
) -> Result<Abbreviations>
[src]
&self,
debug_abbrev: &DebugAbbrev<R>
) -> Result<Abbreviations>
Parse this unit's abbreviations.
Trait Implementations
impl<R: Clone, Offset: Clone> Clone for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
fn clone(&self) -> UnitHeader<R, Offset>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<R: Copy, Offset: Copy> Copy for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: Debug, Offset: Debug> Debug for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: Eq, Offset: Eq> Eq for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: PartialEq, Offset: PartialEq> PartialEq<UnitHeader<R, Offset>> for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
fn eq(&self, other: &UnitHeader<R, Offset>) -> bool
[src]
fn ne(&self, other: &UnitHeader<R, Offset>) -> bool
[src]
impl<R, Offset> StructuralEq for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R, Offset> StructuralPartialEq for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
[src]
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
Auto Trait Implementations
impl<R, Offset> Send for UnitHeader<R, Offset> where
Offset: Send,
R: Send,
Offset: Send,
R: Send,
impl<R, Offset> Sync for UnitHeader<R, Offset> where
Offset: Sync,
R: Sync,
Offset: Sync,
R: Sync,
impl<R, Offset> Unpin for UnitHeader<R, Offset> where
Offset: Unpin,
R: Unpin,
Offset: 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>,