Skip to main content

DebuggingInformationEntry

Struct DebuggingInformationEntry 

Source
pub struct DebuggingInformationEntry<R, Offset = <R as Reader>::Offset>
where R: Reader<Offset = Offset>, Offset: ReaderOffset,
{ pub tag: DwTag, pub has_children: bool, pub attrs: Vec<Attribute<R>>, pub offset: UnitOffset<Offset>, pub depth: isize, }
Expand description

A Debugging Information Entry (DIE).

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

Creating a DebuggingInformationEntry requires an allocation, so frequent cloning of this struct may be slow.

Fields§

§tag: DwTag

The DWARF tag for this entry.

§has_children: bool

Whether this entry has a null terminated list of children.

Note that this list may be empty.

§attrs: Vec<Attribute<R>>

This entry’s attributes.

§offset: UnitOffset<Offset>

The offset within the unit of this entry.

§depth: isize

The tree depth of this entry relative to the entry where reading started.

Implementations§

Source§

impl<R, Offset> DebuggingInformationEntry<R, Offset>
where R: Reader<Offset = Offset>, Offset: ReaderOffset,

Source

pub fn new( tag: DwTag, has_children: bool, attrs: Vec<Attribute<R>>, offset: UnitOffset<Offset>, ) -> Self

Construct a new DebuggingInformationEntry.

Source

pub fn null() -> Self

Construct a new DebuggingInformationEntry with no tag or attributes.

Source

pub fn is_null(&self) -> bool

Return true if the entry tag is DW_TAG_null.

Source

pub fn set_null(&mut self)

Set the entry to a null entry.

This sets the tag to DW_TAG_null, and resets the has_children and attrs fields.

Source

pub fn depth(&self) -> isize

Get the tree depth of this entry relative to the entry where reading started.

Source

pub fn offset(&self) -> UnitOffset<Offset>

Get this entry’s offset.

Source

pub fn tag(&self) -> DwTag

Get this entry’s tag.

Source

pub fn has_children(&self) -> bool

Return true if this entry’s type can have children, false otherwise.

Source

pub fn attrs(&self) -> &[Attribute<R>]

Return this entry’s set of attributes.

Source

pub fn has_attr(&self, name: DwAt) -> bool

Return true if this entry has an attribute with the given name.

Source

pub fn attr(&self, name: DwAt) -> Option<&Attribute<R>>

Find the first attribute in this entry which has the given name.

Returns None if no attribute is found.

Source

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

Find the first attribute in this entry which has the given name, and return its raw value.

Returns None if no attribute is found.

Source

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

Find the first attribute in this entry which has the given name, and return its normalized value.

Returns None if no attribute is found.

Trait Implementations§

Source§

impl<R, Offset> Clone for DebuggingInformationEntry<R, Offset>
where R: Reader<Offset = Offset> + Clone, Offset: ReaderOffset + Clone,

Source§

fn clone(&self) -> DebuggingInformationEntry<R, Offset>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<R, Offset> Debug for DebuggingInformationEntry<R, Offset>
where R: Reader<Offset = Offset> + Debug, Offset: ReaderOffset + Debug,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<R, Offset> Default for DebuggingInformationEntry<R, Offset>
where R: Reader<Offset = Offset>, Offset: ReaderOffset,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<R, Offset> Freeze for DebuggingInformationEntry<R, Offset>
where Offset: Freeze,

§

impl<R, Offset> RefUnwindSafe for DebuggingInformationEntry<R, Offset>
where Offset: RefUnwindSafe, R: RefUnwindSafe,

§

impl<R, Offset> Send for DebuggingInformationEntry<R, Offset>
where Offset: Send, R: Send,

§

impl<R, Offset> Sync for DebuggingInformationEntry<R, Offset>
where Offset: Sync, R: Sync,

§

impl<R, Offset> Unpin for DebuggingInformationEntry<R, Offset>
where Offset: Unpin, R: Unpin,

§

impl<R, Offset> UnsafeUnpin for DebuggingInformationEntry<R, Offset>
where Offset: UnsafeUnpin,

§

impl<R, Offset> UnwindSafe for DebuggingInformationEntry<R, Offset>
where Offset: UnwindSafe, R: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.