[][src]Struct gimli::write::Unit

pub struct Unit {
    pub line_program: LineProgram,
    pub ranges: RangeListTable,
    pub locations: LocationListTable,
    // some fields omitted
}

A unit's debugging information.

Fields

line_program: LineProgram

The line number program for this unit.

ranges: RangeListTable

A table of range lists used by this unit.

locations: LocationListTable

A table of location lists used by this unit.

Implementations

impl Unit[src]

pub fn new(encoding: Encoding, line_program: LineProgram) -> Self[src]

Create a new Unit.

pub fn encoding(&self) -> Encoding[src]

Return the encoding parameters for this unit.

pub fn version(&self) -> u16[src]

Return the DWARF version for this unit.

pub fn address_size(&self) -> u8[src]

Return the address size in bytes for this unit.

pub fn format(&self) -> Format[src]

Return the DWARF format for this unit.

pub fn count(&self) -> usize[src]

Return the number of DebuggingInformationEntrys created for this unit.

This includes entries that no longer have a parent.

pub fn root(&self) -> UnitEntryId[src]

Return the id of the root entry.

pub fn add(&mut self, parent: UnitEntryId, tag: DwTag) -> UnitEntryId[src]

Add a new DebuggingInformationEntry to this unit and return its id.

The parent must be within the same unit.

Panics

Panics if parent is invalid.

pub fn get(&self, id: UnitEntryId) -> &DebuggingInformationEntry[src]

Get a reference to an entry.

Panics

Panics if id is invalid.

pub fn get_mut(&mut self, id: UnitEntryId) -> &mut DebuggingInformationEntry[src]

Get a mutable reference to an entry.

Panics

Panics if id is invalid.

Trait Implementations

impl Debug for Unit[src]

Auto Trait Implementations

impl RefUnwindSafe for Unit

impl Send for Unit

impl Sync for Unit

impl Unpin for Unit

impl UnwindSafe for Unit

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.