Struct gimli::read::Attribute [−][src]
pub struct Attribute<R: Reader> { /* fields omitted */ }
Expand description
An attribute in a DebuggingInformationEntry
, consisting of a name and
associated value.
Implementations
Get this attribute’s raw value.
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 “Table 7.5: Attribute encodings” and “Table 7.6: Attribute form encodings”.
Try to convert this attribute’s value to an unsigned integer.
Try to convert this attribute’s value to a signed integer.
Try to convert this attribute’s value to an offset.
Try to convert this attribute’s value to an expression or location buffer.
Expressions and locations may be DW_FORM_block*
or DW_FORM_exprloc
.
The standard doesn’t mention DW_FORM_block*
as a possible form, but
it is encountered in practice.
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
.
Warning: this function does not handle all possible string forms.
Use Dwarf::attr_string
instead.
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
.
Warning: this function does not handle all possible string forms.
Use Dwarf::attr_string
instead.
Trait Implementations
Auto Trait Implementations
impl<R> RefUnwindSafe for Attribute<R> where
R: RefUnwindSafe,
<R as Reader>::Offset: RefUnwindSafe,
impl<R> UnwindSafe for Attribute<R> where
R: UnwindSafe,
<R as Reader>::Offset: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more