Enum gimli::read::AttributeValue [−][src]
#[repr(u64)]
pub enum AttributeValue<R, Offset = <R as Reader>::Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset, {
Show 46 variants
Addr(u64),
Block(R),
Data1(u8),
Data2(u16),
Data4(u32),
Data8(u64),
Sdata(i64),
Udata(u64),
Exprloc(Expression<R>),
Flag(bool),
SecOffset(Offset),
DebugAddrBase(DebugAddrBase<Offset>),
DebugAddrIndex(DebugAddrIndex<Offset>),
UnitRef(UnitOffset<Offset>),
DebugInfoRef(DebugInfoOffset<Offset>),
DebugInfoRefSup(DebugInfoOffset<Offset>),
DebugLineRef(DebugLineOffset<Offset>),
LocationListsRef(LocationListsOffset<Offset>),
DebugLocListsBase(DebugLocListsBase<Offset>),
DebugLocListsIndex(DebugLocListsIndex<Offset>),
DebugMacinfoRef(DebugMacinfoOffset<Offset>),
DebugMacroRef(DebugMacroOffset<Offset>),
RangeListsRef(RangeListsOffset<Offset>),
DebugRngListsBase(DebugRngListsBase<Offset>),
DebugRngListsIndex(DebugRngListsIndex<Offset>),
DebugTypesRef(DebugTypeSignature),
DebugStrRef(DebugStrOffset<Offset>),
DebugStrRefSup(DebugStrOffset<Offset>),
DebugStrOffsetsBase(DebugStrOffsetsBase<Offset>),
DebugStrOffsetsIndex(DebugStrOffsetsIndex<Offset>),
DebugLineStrRef(DebugLineStrOffset<Offset>),
String(R),
Encoding(DwAte),
DecimalSign(DwDs),
Endianity(DwEnd),
Accessibility(DwAccess),
Visibility(DwVis),
Virtuality(DwVirtuality),
Language(DwLang),
AddressClass(DwAddr),
IdentifierCase(DwId),
CallingConvention(DwCc),
Inline(DwInl),
Ordering(DwOrd),
FileIndex(u64),
DwoId(DwoId),
}
Expand description
The value of an attribute in a DebuggingInformationEntry
.
Variants
Addr(u64)
Tuple Fields
0: u64
“Refers to some location in the address space of the described program.”
Block(R)
A slice of an arbitrary number of bytes.
Data1(u8)
Tuple Fields
0: u8
A one byte constant data value. How to interpret the byte depends on context.
From section 7 of the standard: “Depending on context, it may be a signed integer, an unsigned integer, a floating-point constant, or anything else.”
Data2(u16)
Tuple Fields
0: u16
A two byte constant data value. How to interpret the bytes depends on context.
These bytes have been converted from R::Endian
. This may need to be reversed
if this was not required.
From section 7 of the standard: “Depending on context, it may be a signed integer, an unsigned integer, a floating-point constant, or anything else.”
Data4(u32)
Tuple Fields
0: u32
A four byte constant data value. How to interpret the bytes depends on context.
These bytes have been converted from R::Endian
. This may need to be reversed
if this was not required.
From section 7 of the standard: “Depending on context, it may be a signed integer, an unsigned integer, a floating-point constant, or anything else.”
Data8(u64)
Tuple Fields
0: u64
An eight byte constant data value. How to interpret the bytes depends on context.
These bytes have been converted from R::Endian
. This may need to be reversed
if this was not required.
From section 7 of the standard: “Depending on context, it may be a signed integer, an unsigned integer, a floating-point constant, or anything else.”
Sdata(i64)
Tuple Fields
0: i64
A signed integer constant.
Udata(u64)
Tuple Fields
0: u64
An unsigned integer constant.
Exprloc(Expression<R>)
Tuple Fields
0: Expression<R>
“The information bytes contain a DWARF expression (see Section 2.5) or location description (see Section 2.6).”
Flag(bool)
Tuple Fields
0: bool
A boolean that indicates presence or absence of the attribute.
SecOffset(Offset)
An offset into another section. Which section this is an offset into depends on context.
DebugAddrBase(DebugAddrBase<Offset>)
Tuple Fields
0: DebugAddrBase<Offset>
An offset to a set of addresses in the .debug_addr
section.
DebugAddrIndex(DebugAddrIndex<Offset>)
Tuple Fields
0: DebugAddrIndex<Offset>
An index into a set of addresses in the .debug_addr
section.
UnitRef(UnitOffset<Offset>)
Tuple Fields
0: UnitOffset<Offset>
An offset into the current compilation unit.
DebugInfoRef(DebugInfoOffset<Offset>)
Tuple Fields
0: DebugInfoOffset<Offset>
An offset into the current .debug_info
section, but possibly a
different compilation unit from the current one.
DebugInfoRefSup(DebugInfoOffset<Offset>)
Tuple Fields
0: DebugInfoOffset<Offset>
An offset into the .debug_info
section of the supplementary object file.
DebugLineRef(DebugLineOffset<Offset>)
Tuple Fields
0: DebugLineOffset<Offset>
An offset into the .debug_line
section.
LocationListsRef(LocationListsOffset<Offset>)
Tuple Fields
0: LocationListsOffset<Offset>
An offset into either the .debug_loc
section or the .debug_loclists
section.
DebugLocListsBase(DebugLocListsBase<Offset>)
Tuple Fields
0: DebugLocListsBase<Offset>
An offset to a set of offsets in the .debug_loclists
section.
DebugLocListsIndex(DebugLocListsIndex<Offset>)
Tuple Fields
0: DebugLocListsIndex<Offset>
An index into a set of offsets in the .debug_loclists
section.
DebugMacinfoRef(DebugMacinfoOffset<Offset>)
Tuple Fields
0: DebugMacinfoOffset<Offset>
An offset into the .debug_macinfo
section.
DebugMacroRef(DebugMacroOffset<Offset>)
Tuple Fields
0: DebugMacroOffset<Offset>
An offset into the .debug_macro
section.
RangeListsRef(RangeListsOffset<Offset>)
Tuple Fields
0: RangeListsOffset<Offset>
An offset into the .debug_ranges
section.
DebugRngListsBase(DebugRngListsBase<Offset>)
Tuple Fields
0: DebugRngListsBase<Offset>
An offset to a set of offsets in the .debug_rnglists
section.
DebugRngListsIndex(DebugRngListsIndex<Offset>)
Tuple Fields
0: DebugRngListsIndex<Offset>
An index into a set of offsets in the .debug_rnglists
section.
DebugTypesRef(DebugTypeSignature)
Tuple Fields
A type signature.
DebugStrRef(DebugStrOffset<Offset>)
Tuple Fields
0: DebugStrOffset<Offset>
An offset into the .debug_str
section.
DebugStrRefSup(DebugStrOffset<Offset>)
Tuple Fields
0: DebugStrOffset<Offset>
An offset into the .debug_str
section of the supplementary object file.
DebugStrOffsetsBase(DebugStrOffsetsBase<Offset>)
Tuple Fields
0: DebugStrOffsetsBase<Offset>
An offset to a set of entries in the .debug_str_offsets
section.
DebugStrOffsetsIndex(DebugStrOffsetsIndex<Offset>)
Tuple Fields
0: DebugStrOffsetsIndex<Offset>
An index into a set of entries in the .debug_str_offsets
section.
DebugLineStrRef(DebugLineStrOffset<Offset>)
Tuple Fields
0: DebugLineStrOffset<Offset>
An offset into the .debug_line_str
section.
String(R)
A slice of bytes representing a string. Does not include a final null byte. Not guaranteed to be UTF-8 or anything like that.
Encoding(DwAte)
Tuple Fields
0: DwAte
The value of a DW_AT_encoding
attribute.
DecimalSign(DwDs)
Tuple Fields
0: DwDs
The value of a DW_AT_decimal_sign
attribute.
Endianity(DwEnd)
Tuple Fields
0: DwEnd
The value of a DW_AT_endianity
attribute.
Accessibility(DwAccess)
Tuple Fields
0: DwAccess
The value of a DW_AT_accessibility
attribute.
Visibility(DwVis)
Tuple Fields
0: DwVis
The value of a DW_AT_visibility
attribute.
Virtuality(DwVirtuality)
Tuple Fields
0: DwVirtuality
The value of a DW_AT_virtuality
attribute.
Language(DwLang)
Tuple Fields
0: DwLang
The value of a DW_AT_language
attribute.
AddressClass(DwAddr)
Tuple Fields
0: DwAddr
The value of a DW_AT_address_class
attribute.
IdentifierCase(DwId)
Tuple Fields
0: DwId
The value of a DW_AT_identifier_case
attribute.
CallingConvention(DwCc)
Tuple Fields
0: DwCc
The value of a DW_AT_calling_convention
attribute.
Inline(DwInl)
Tuple Fields
0: DwInl
The value of a DW_AT_inline
attribute.
Ordering(DwOrd)
Tuple Fields
0: DwOrd
The value of a DW_AT_ordering
attribute.
FileIndex(u64)
Tuple Fields
0: u64
An index into the filename entries from the line number information table for the compilation unit containing this value.
DwoId(DwoId)
Tuple Fields
0: DwoId
An implementation-defined identifier uniquely identifying a compilation unit.
Implementations
impl<R, Offset> AttributeValue<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R, Offset> AttributeValue<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
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
impl<R: Clone, Offset: Clone> Clone for AttributeValue<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: Clone, Offset: Clone> Clone for AttributeValue<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: Debug, Offset: Debug> Debug for AttributeValue<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: Debug, Offset: Debug> Debug for AttributeValue<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: PartialEq, Offset: PartialEq> PartialEq<AttributeValue<R, Offset>> for AttributeValue<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: PartialEq, Offset: PartialEq> PartialEq<AttributeValue<R, Offset>> for AttributeValue<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl<R: Copy, Offset: Copy> Copy for AttributeValue<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R: Eq, Offset: Eq> Eq for AttributeValue<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R, Offset> StructuralEq for AttributeValue<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
impl<R, Offset> StructuralPartialEq for AttributeValue<R, Offset> where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
Auto Trait Implementations
impl<R, Offset> RefUnwindSafe for AttributeValue<R, Offset> where
Offset: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, Offset> Send for AttributeValue<R, Offset> where
Offset: Send,
R: Send,
impl<R, Offset> Sync for AttributeValue<R, Offset> where
Offset: Sync,
R: Sync,
impl<R, Offset> Unpin for AttributeValue<R, Offset> where
Offset: Unpin,
R: Unpin,
impl<R, Offset> UnwindSafe for AttributeValue<R, Offset> where
Offset: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more