Struct gimli::Attribute [−][src]
pub struct Attribute<R: Reader> { /* fields omitted */ }
An attribute in a DebuggingInformationEntry
, consisting of a name and
associated value.
Methods
impl<R: Reader> Attribute<R>
[src]
impl<R: Reader> Attribute<R>
pub fn name(&self) -> DwAt
[src]
pub fn name(&self) -> DwAt
Get this attribute's name.
pub fn raw_value(&self) -> AttributeValue<R>
[src]
pub fn raw_value(&self) -> AttributeValue<R>
Get this attribute's raw value.
pub fn value(&self) -> AttributeValue<R>
[src]
pub fn value(&self) -> AttributeValue<R>
Get this attribute's normalized value.
Attribute values can potentially be encoded in multiple equivalent forms, and may have special meaning depending on the attribute name. This method converts the attribute value to a normalized form based on the attribute name.
See "Figure 20. Attribute encodings" and "Figure 21. Attribute form encodings".
pub fn u8_value(&self) -> Option<u8>
[src]
pub fn u8_value(&self) -> Option<u8>
Try to convert this attribute's value to a u8.
pub fn u16_value(&self) -> Option<u16>
[src]
pub fn u16_value(&self) -> Option<u16>
Try to convert this attribute's value to a u16.
pub fn udata_value(&self) -> Option<u64>
[src]
pub fn udata_value(&self) -> Option<u64>
Try to convert this attribute's value to an unsigned integer.
pub fn sdata_value(&self) -> Option<i64>
[src]
pub fn sdata_value(&self) -> Option<i64>
Try to convert this attribute's value to a signed integer.
pub fn offset_value(&self) -> Option<R::Offset>
[src]
pub fn offset_value(&self) -> Option<R::Offset>
Try to convert this attribute's value to an offset.
Offsets will be Data
in DWARF version 2/3, and SecOffset
otherwise.
pub fn string_value(&self, debug_str: &DebugStr<R>) -> Option<R>
[src]
pub fn string_value(&self, debug_str: &DebugStr<R>) -> Option<R>
Try to return this attribute's value as a string slice.
If this attribute's value is either an inline DW_FORM_string
string,
or a DW_FORM_strp
reference to an offset into the .debug_str
section, return the attribute's string value as Some
. Other attribute
value forms are returned as None
.
pub fn string_value_sup(
&self,
debug_str: &DebugStr<R>,
debug_str_sup: Option<&DebugStr<R>>
) -> Option<R>
[src]
pub fn string_value_sup(
&self,
debug_str: &DebugStr<R>,
debug_str_sup: Option<&DebugStr<R>>
) -> Option<R>
Try to return this attribute's value as a string slice.
If this attribute's value is either an inline DW_FORM_string
string,
or a DW_FORM_strp
reference to an offset into the .debug_str
section, or a DW_FORM_strp_sup
reference to an offset into a supplementary
object file, return the attribute's string value as Some
. Other attribute
value forms are returned as None
.
Trait Implementations
impl<R: Copy + Reader> Copy for Attribute<R>
[src]
impl<R: Copy + Reader> Copy for Attribute<R>
impl<R: Clone + Reader> Clone for Attribute<R>
[src]
impl<R: Clone + Reader> Clone for Attribute<R>
fn clone(&self) -> Attribute<R>
[src]
fn clone(&self) -> Attribute<R>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<R: Debug + Reader> Debug for Attribute<R>
[src]
impl<R: Debug + Reader> Debug for Attribute<R>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<R: Eq + Reader> Eq for Attribute<R>
[src]
impl<R: Eq + Reader> Eq for Attribute<R>
impl<R: PartialEq + Reader> PartialEq for Attribute<R>
[src]
impl<R: PartialEq + Reader> PartialEq for Attribute<R>