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]
fn name(&self) -> DwAt
[src]
Get this attribute's name.
fn raw_value(&self) -> AttributeValue<R>
[src]
Get this attribute's raw value.
fn value(&self) -> AttributeValue<R>
[src]
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".
fn u8_value(&self) -> Option<u8>
[src]
Try to convert this attribute's value to a u8.
fn u16_value(&self) -> Option<u16>
[src]
Try to convert this attribute's value to a u16.
fn udata_value(&self) -> Option<u64>
[src]
Try to convert this attribute's value to an unsigned integer.
fn sdata_value(&self) -> Option<i64>
[src]
Try to convert this attribute's value to a signed integer.
fn offset_value(&self) -> Option<R::Offset>
[src]
Try to convert this attribute's value to an offset.
Offsets will be Data
in DWARF version 2/3, and SecOffset
otherwise.
fn string_value(&self, debug_str: &DebugStr<R>) -> Option<R>
[src]
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
.
Trait Implementations
impl<R: Copy + Reader> Copy for Attribute<R>
[src]
impl<R: Clone + Reader> Clone for Attribute<R>
[src]
fn clone(&self) -> Attribute<R>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more