Enum gimli::write::AttributeValue

source ·
pub enum AttributeValue {
Show 37 variants Address(Address), Block(Vec<u8>), Data1(u8), Data2(u16), Data4(u32), Data8(u64), Sdata(i64), Udata(u64), Exprloc(Expression), Flag(bool), FlagPresent, UnitRef(UnitEntryId), DebugInfoRef(Reference), DebugInfoRefSup(DebugInfoOffset), LineProgramRef, LocationListRef(LocationListId), DebugMacinfoRef(DebugMacinfoOffset), DebugMacroRef(DebugMacroOffset), RangeListRef(RangeListId), DebugTypesRef(DebugTypeSignature), StringRef(StringId), DebugStrRefSup(DebugStrOffset), LineStringRef(LineStringId), String(Vec<u8>), 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(Option<FileId>),
}
Expand description

The value of an attribute in a DebuggingInformationEntry.

Variants§

§

Address(Address)

“Refers to some location in the address space of the described program.”

§

Block(Vec<u8>)

A slice of an arbitrary number of bytes.

§

Data1(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)

A two byte constant data value. How to interpret the bytes depends on context.

This value will be converted to the target endian before writing.

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)

A four byte constant data value. How to interpret the bytes depends on context.

This value will be converted to the target endian before writing.

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)

An eight byte constant data value. How to interpret the bytes depends on context.

This value will be converted to the target endian before writing.

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)

A signed integer constant.

§

Udata(u64)

An unsigned integer constant.

§

Exprloc(Expression)

“The information bytes contain a DWARF expression (see Section 2.5) or location description (see Section 2.6).”

§

Flag(bool)

A boolean that indicates presence or absence of the attribute.

§

FlagPresent

An attribute that is always present.

§

UnitRef(UnitEntryId)

A reference to a DebuggingInformationEntry in this unit.

§

DebugInfoRef(Reference)

A reference to a DebuggingInformationEntry in a potentially different unit.

§

DebugInfoRefSup(DebugInfoOffset)

An offset into the .debug_info section of the supplementary object file.

The API does not currently assist with generating this offset. This variant will be removed from the API once support for writing supplementary object files is implemented.

§

LineProgramRef

A reference to a line number program.

§

LocationListRef(LocationListId)

A reference to a location list.

§

DebugMacinfoRef(DebugMacinfoOffset)

An offset into the .debug_macinfo section.

The API does not currently assist with generating this offset. This variant will be removed from the API once support for writing .debug_macinfo sections is implemented.

§

DebugMacroRef(DebugMacroOffset)

An offset into the .debug_macro section.

The API does not currently assist with generating this offset. This variant will be removed from the API once support for writing .debug_macro sections is implemented.

§

RangeListRef(RangeListId)

A reference to a range list.

§

DebugTypesRef(DebugTypeSignature)

A type signature.

The API does not currently assist with generating this signature. This variant will be removed from the API once support for writing .debug_types sections is implemented.

§

StringRef(StringId)

A reference to a string in the .debug_str section.

§

DebugStrRefSup(DebugStrOffset)

An offset into the .debug_str section of the supplementary object file.

The API does not currently assist with generating this offset. This variant will be removed from the API once support for writing supplementary object files is implemented.

§

LineStringRef(LineStringId)

A reference to a string in the .debug_line_str section.

§

String(Vec<u8>)

A slice of bytes representing a string. Must not include null bytes. Not guaranteed to be UTF-8 or anything like that.

§

Encoding(DwAte)

The value of a DW_AT_encoding attribute.

§

DecimalSign(DwDs)

The value of a DW_AT_decimal_sign attribute.

§

Endianity(DwEnd)

The value of a DW_AT_endianity attribute.

§

Accessibility(DwAccess)

The value of a DW_AT_accessibility attribute.

§

Visibility(DwVis)

The value of a DW_AT_visibility attribute.

§

Virtuality(DwVirtuality)

The value of a DW_AT_virtuality attribute.

§

Language(DwLang)

The value of a DW_AT_language attribute.

§

AddressClass(DwAddr)

The value of a DW_AT_address_class attribute.

§

IdentifierCase(DwId)

The value of a DW_AT_identifier_case attribute.

§

CallingConvention(DwCc)

The value of a DW_AT_calling_convention attribute.

§

Inline(DwInl)

The value of a DW_AT_inline attribute.

§

Ordering(DwOrd)

The value of a DW_AT_ordering attribute.

§

FileIndex(Option<FileId>)

An index into the filename entries from the line number information table for the unit containing this value.

Implementations§

source§

impl AttributeValue

source

pub fn form(&self, encoding: Encoding) -> Result<DwForm>

Return the form that will be used to encode this value.

Trait Implementations§

source§

impl Clone for AttributeValue

source§

fn clone(&self) -> AttributeValue

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for AttributeValue

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for AttributeValue

source§

fn eq(&self, other: &AttributeValue) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for AttributeValue

source§

impl StructuralPartialEq for AttributeValue

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.