pub struct NameEntry<R: Reader> {
pub offset: NameEntryOffset<R::Offset>,
pub abbrev_code: u64,
pub tag: DwTag,
pub attrs: Vec<NameAttribute<R>>,
}Expand description
A parsed entry from the .debug_names section.
Fields§
§offset: NameEntryOffset<R::Offset>The offset of the entry in the entries pool.
abbrev_code: u64The abbreviation code for this entry.
tag: DwTagThe DIE tag for this entry.
attrs: Vec<NameAttribute<R>>The attributes for this entry.
Implementations§
Source§impl<R: Reader> NameEntry<R>
impl<R: Reader> NameEntry<R>
Sourcepub fn compile_unit(
&self,
names: &NameIndex<R>,
) -> Result<Option<DebugInfoOffset<R::Offset>>>
pub fn compile_unit( &self, names: &NameIndex<R>, ) -> Result<Option<DebugInfoOffset<R::Offset>>>
Get the value of the DW_IDX_compile_unit attribute, if any.
If neither DW_IDX_compile_unit nor DW_IDX_type_unit exist then you should use
NameIndex::default_compile_unit.
If both DW_IDX_compile_unit and DW_IDX_type_unit exist then this value is for
a skeleton CU that may be used to locate a split DWARF object file containing
the type unit.
Sourcepub fn type_unit(
&self,
names: &NameIndex<R>,
) -> Result<Option<NameTypeUnit<R::Offset>>>
pub fn type_unit( &self, names: &NameIndex<R>, ) -> Result<Option<NameTypeUnit<R::Offset>>>
Get the value of the DW_IDX_type_unit attribute, if any.
Sourcepub fn die_offset(&self) -> Result<Option<UnitOffset<R::Offset>>>
pub fn die_offset(&self) -> Result<Option<UnitOffset<R::Offset>>>
Get the value of the DW_IDX_die_offset attribute, if any.
This is the offset of the DIE within the compile unit or type unit.
Sourcepub fn parent(&self) -> Result<Option<Option<NameEntryOffset<R::Offset>>>>
pub fn parent(&self) -> Result<Option<Option<NameEntryOffset<R::Offset>>>>
Get the value of the DW_IDX_parent attribute, if any.
Returns Ok(Some(Some(offset))) if the DIE parent is indexed.
Returns Ok(Some(None)) if the DIE parent is not indexed.
Returns Ok(None) if it is unknown whether the DIE parent is indexed
because the producer did not generate a DW_IDX_parent attribute.
Trait Implementations§
impl<R: Eq + Reader> Eq for NameEntry<R>
impl<R: Reader> StructuralPartialEq for NameEntry<R>
Auto Trait Implementations§
impl<R> Freeze for NameEntry<R>
impl<R> RefUnwindSafe for NameEntry<R>
impl<R> Send for NameEntry<R>
impl<R> Sync for NameEntry<R>
impl<R> Unpin for NameEntry<R>
impl<R> UnsafeUnpin for NameEntry<R>
impl<R> UnwindSafe for NameEntry<R>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.