Struct gimli::read::UnitHeader
source · [−]pub struct UnitHeader<R, Offset = <R as Reader>::Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset, { /* private fields */ }
Expand description
The common fields for the headers of compilation units and type units.
Implementations
Static methods.
pub fn new(
encoding: Encoding,
unit_length: Offset,
unit_type: UnitType<Offset>,
debug_abbrev_offset: DebugAbbrevOffset<Offset>,
unit_offset: UnitSectionOffset<Offset>,
entries_buf: R
) -> Self
pub fn new(
encoding: Encoding,
unit_length: Offset,
unit_type: UnitType<Offset>,
debug_abbrev_offset: DebugAbbrevOffset<Offset>,
unit_offset: UnitSectionOffset<Offset>,
entries_buf: R
) -> Self
Construct a new UnitHeader
.
Instance methods.
Get the offset of this unit within its section.
Return the serialized size of the common unit header for the given DWARF format.
Get the length of the debugging info for this compilation unit, not including the byte length of the encoded length itself.
Get the length of the debugging info for this compilation unit, including the byte length of the encoded length itself.
Get the DWARF version of the debugging info for this compilation unit.
The offset into the .debug_abbrev
section for this compilation unit’s
debugging information entries’ abbreviations.
The size of addresses (in bytes) in this compilation unit.
Whether this compilation unit is encoded in 64- or 32-bit DWARF.
The serialized size of the header for this compilation unit.
Get the underlying bytes for the supplied range.
Get the underlying bytes for the supplied range.
Get the underlying bytes for the supplied range.
pub fn entry<'me, 'abbrev>(
&'me self,
abbreviations: &'abbrev Abbreviations,
offset: UnitOffset<Offset>
) -> Result<DebuggingInformationEntry<'abbrev, 'me, R>>
pub fn entry<'me, 'abbrev>(
&'me self,
abbreviations: &'abbrev Abbreviations,
offset: UnitOffset<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>
pub fn entries<'me, 'abbrev>(
&'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<Offset>
) -> Result<EntriesCursor<'abbrev, 'me, R>>
pub fn entries_at_offset<'me, 'abbrev>(
&'me self,
abbreviations: &'abbrev Abbreviations,
offset: UnitOffset<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<Offset>>
) -> Result<EntriesTree<'abbrev, 'me, R>>
pub fn entries_tree<'me, 'abbrev>(
&'me self,
abbreviations: &'abbrev Abbreviations,
offset: Option<UnitOffset<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<Offset>>
) -> Result<EntriesRaw<'abbrev, 'me, R>>
pub fn entries_raw<'me, 'abbrev>(
&'me self,
abbreviations: &'abbrev Abbreviations,
offset: Option<UnitOffset<Offset>>
) -> Result<EntriesRaw<'abbrev, 'me, R>>
Read the raw data that defines the Debugging Information Entries.
Parse this unit’s abbreviations.
Trait Implementations
impl<R: Clone, Offset: Clone> Clone for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: Clone, Offset: Clone> Clone for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: Debug, Offset: Debug> Debug for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: Debug, Offset: Debug> Debug for UnitHeader<R, Offset> where
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,
impl<R: PartialEq, Offset: PartialEq> PartialEq<UnitHeader<R, Offset>> for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl<R: Copy, Offset: Copy> Copy for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: Eq, Offset: Eq> Eq for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R, Offset> StructuralEq for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R, Offset> StructuralPartialEq for UnitHeader<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
Auto Trait Implementations
impl<R, Offset> RefUnwindSafe for UnitHeader<R, Offset> where
Offset: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, Offset> Send for UnitHeader<R, Offset> where
Offset: Send,
R: Send,
impl<R, Offset> Sync for UnitHeader<R, Offset> where
Offset: Sync,
R: Sync,
impl<R, Offset> Unpin for UnitHeader<R, Offset> where
Offset: Unpin,
R: Unpin,
impl<R, Offset> UnwindSafe for UnitHeader<R, Offset> where
Offset: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more