Struct gimli::write::DebuggingInformationEntry

source ·
pub struct DebuggingInformationEntry { /* private fields */ }
Expand description

A Debugging Information Entry (DIE).

DIEs have a set of attributes and optionally have children DIEs as well.

DIEs form a tree without any cycles. This is enforced by specifying the parent when creating a DIE, and disallowing changes of parent.

Implementations§

source§

impl DebuggingInformationEntry

source

pub fn id(&self) -> UnitEntryId

Return the id of this entry.

source

pub fn parent(&self) -> Option<UnitEntryId>

Return the parent of this entry.

source

pub fn tag(&self) -> DwTag

Return the tag of this entry.

source

pub fn sibling(&self) -> bool

Return true if a DW_AT_sibling attribute will be emitted.

source

pub fn set_sibling(&mut self, sibling: bool)

Set whether a DW_AT_sibling attribute will be emitted.

The attribute will only be emitted if the DIE has children.

source

pub fn attrs(&self) -> Iter<'_, Attribute>

Iterate over the attributes of this entry.

source

pub fn attrs_mut(&mut self) -> IterMut<'_, Attribute>

Iterate over the attributes of this entry for modification.

source

pub fn get(&self, name: DwAt) -> Option<&AttributeValue>

Get an attribute.

source

pub fn get_mut(&mut self, name: DwAt) -> Option<&mut AttributeValue>

Get an attribute for modification.

source

pub fn set(&mut self, name: DwAt, value: AttributeValue)

Set an attribute.

Replaces any existing attribute with the same name.

§Panics

Panics if name is DW_AT_sibling. Use set_sibling instead.

source

pub fn delete(&mut self, name: DwAt)

Delete an attribute.

Replaces any existing attribute with the same name.

source

pub fn children(&self) -> Iter<'_, UnitEntryId>

Iterate over the children of this entry.

Note: use Unit::add to add a new child to this entry.

source

pub fn delete_child(&mut self, id: UnitEntryId)

Delete a child entry and all of its children.

Trait Implementations§

source§

impl Debug for DebuggingInformationEntry

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.