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
sourceimpl DebuggingInformationEntry
impl DebuggingInformationEntry
sourcepub fn id(&self) -> UnitEntryId
pub fn id(&self) -> UnitEntryId
Return the id of this entry.
sourcepub fn parent(&self) -> Option<UnitEntryId>
pub fn parent(&self) -> Option<UnitEntryId>
Return the parent of this entry.
sourcepub fn set_sibling(&mut self, sibling: bool)
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.
sourcepub fn attrs_mut(&mut self) -> IterMut<'_, Attribute>
pub fn attrs_mut(&mut self) -> IterMut<'_, Attribute>
Iterate over the attributes of this entry for modification.
sourcepub fn get(&self, name: DwAt) -> Option<&AttributeValue>
pub fn get(&self, name: DwAt) -> Option<&AttributeValue>
Get an attribute.
sourcepub fn get_mut(&mut self, name: DwAt) -> Option<&mut AttributeValue>
pub fn get_mut(&mut self, name: DwAt) -> Option<&mut AttributeValue>
Get an attribute for modification.
sourcepub fn set(&mut self, name: DwAt, value: AttributeValue)
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.
sourcepub fn delete(&mut self, name: DwAt)
pub fn delete(&mut self, name: DwAt)
Delete an attribute.
Replaces any existing attribute with the same name.
sourcepub fn children(&self) -> Iter<'_, UnitEntryId>
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.
sourcepub fn delete_child(&mut self, id: UnitEntryId)
pub fn delete_child(&mut self, id: UnitEntryId)
Delete a child entry and all of its children.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for DebuggingInformationEntry
impl Send for DebuggingInformationEntry
impl Sync for DebuggingInformationEntry
impl Unpin for DebuggingInformationEntry
impl UnwindSafe for DebuggingInformationEntry
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more