Struct gimli::UnitHeader
[−]
[src]
pub struct UnitHeader<'input, Endian> where Endian: Endianity {
// some fields omitted
}
The header of a compilation unit's debugging information.
Methods
impl<'input, Endian> UnitHeader<'input, Endian> where Endian: Endianity
[src]
Static methods.
fn new(unit_length: u64, version: u16, debug_abbrev_offset: DebugAbbrevOffset, address_size: u8, format: Format, entries_buf: &'input [u8]) -> UnitHeader<'input, Endian>
Construct a new UnitHeader
.
fn size_of_unit_length(format: Format) -> usize
Return the serialized size of the unit_length
attribute for the given
DWARF format.
fn size_of_header(format: Format) -> usize
Return the serialized size of the compilation unit header for the given DWARF format.
impl<'input, Endian> UnitHeader<'input, Endian> where Endian: Endianity
[src]
Instance methods.
fn unit_length(&self) -> u64
Get the length of the debugging info for this compilation unit, not including the byte length of the encoded length itself.
fn length_including_self(&self) -> u64
Get the length of the debugging info for this compilation unit, uncluding the byte length of the encoded length itself.
fn version(&self) -> u16
Get the DWARF version of the debugging info for this compilation unit.
fn debug_abbrev_offset(&self) -> DebugAbbrevOffset
The offset into the .debug_abbrev
section for this compilation unit's
debugging information entries' abbreviations.
fn address_size(&self) -> u8
The size of addresses (in bytes) in this compilation unit.
fn format(&self) -> Format
Whether this compilation unit is encoded in 64- or 32-bit DWARF.
fn range(&self, idx: Range<UnitOffset>) -> &'input [u8]
Get the underlying bytes for the supplied range.
fn range_from(&self, idx: RangeFrom<UnitOffset>) -> &'input [u8]
Get the underlying bytes for the supplied range.
fn range_to(&self, idx: RangeTo<UnitOffset>) -> &'input [u8]
Get the underlying bytes for the supplied range.
fn entries<'me, 'abbrev>(&'me self, abbreviations: &'abbrev Abbreviations) -> EntriesCursor<'input, 'abbrev, 'me, Endian>
Navigate this compilation unit's DebuggingInformationEntry
s.
fn abbreviations(&self, debug_abbrev: DebugAbbrev<Endian>) -> ParseResult<Abbreviations>
Parse this compilation unit's abbreviations.
use gimli::DebugAbbrev; let unit = get_some_unit(); let debug_abbrev = DebugAbbrev::<LittleEndian>::new(read_debug_abbrev_section_somehow()); let abbrevs_for_unit = unit.abbreviations(debug_abbrev).unwrap();
Trait Implementations
impl<'input, Endian: Eq> Eq for UnitHeader<'input, Endian> where Endian: Endianity
[src]
impl<'input, Endian: PartialEq> PartialEq for UnitHeader<'input, Endian> where Endian: Endianity
[src]
fn eq(&self, __arg_0: &UnitHeader<'input, Endian>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &UnitHeader<'input, Endian>) -> bool
This method tests for !=
.
impl<'input, Endian: Copy> Copy for UnitHeader<'input, Endian> where Endian: Endianity
[src]
impl<'input, Endian: Clone> Clone for UnitHeader<'input, Endian> where Endian: Endianity
[src]
fn clone(&self) -> UnitHeader<'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