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