Skip to main content

Error

Enum Error 

Source
#[non_exhaustive]
pub enum Error {
Show 76 variants Io, PcRelativePointerButSectionBaseIsUndefined, TextRelativePointerButTextBaseIsUndefined, DataRelativePointerButDataBaseIsUndefined, FuncRelativePointerInBadContext, CannotParseOmitPointerEncoding, BadUnsignedLeb128, BadSignedLeb128, AbbreviationTagZero, AttributeNameZero, AttributeFormZero, InvalidAbbreviationChildren(DwChildren), UnknownForm(DwForm), DuplicateAbbreviationCode(u64), UnknownReservedLength(u32), UnknownVersion(u64), InvalidAbbreviationCode(u64), UnexpectedEof(ReaderOffsetId), UnknownLocListsEntry(DwLle), UnknownRangeListsEntry(DwRle), UnsupportedAddressSize(u8), UnsupportedOffsetSize(u8), MinimumInstructionLengthZero, MaximumOperationsPerInstructionZero, LineRangeZero, OpcodeBaseZero, BadUtf8, NotCieId(u64), NotCiePointer(u64), BadBranchTarget(u64), InvalidPushObjectAddress, NotEnoughStackItems, TooManyIterations, InvalidExpression(DwOp), UnsupportedEvaluation, InvalidPiece, InvalidExpressionTerminator(u64), DivisionByZero, TypeMismatch, IntegralTypeRequired, UnsupportedTypeOperation, InvalidShiftExpression, InvalidDerefSize(u8), UnknownCallFrameInstruction(DwCfa), InvalidCfiSetLoc(u64), AddressOverflow, CfiInstructionInInvalidContext, PopWithEmptyStack, NoUnwindInfoForAddress, UnsupportedOffset, UnknownPointerEncoding(DwEhPe), NoEntryAtGivenOffset(u64), OffsetOutOfBounds(u64), UnknownAugmentation, UnsupportedPointerEncoding(DwEhPe), UnsupportedIndirectPointer, UnsupportedRegister(u64), TooManyRegisterRules, StackFull, UnknownUnitType(DwUt), UnsupportedSegmentSize(u8), MissingUnitDie, MissingSplitUnit, UnsupportedAttributeForm(DwForm), MissingFileEntryFormatPath, ExpectedStringAttributeValue, InvalidImplicitConst, UnsupportedIndexSectionCount(u32), InvalidIndexSlotCount(u32), InvalidIndexRow(u32), UnknownIndexSection(DwSect), UnknownIndexSectionV2(DwSectV2), InvalidMacinfoType(DwMacinfo), InvalidMacroType(DwMacro), UnsupportedOpcodeOperandsTable, InvalidNameAttributeIndex(u64),
}
Expand description

An error that occurred when parsing.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Io

An I/O error occurred while reading.

§

PcRelativePointerButSectionBaseIsUndefined

Found a PC relative pointer, but the section base is undefined.

§

TextRelativePointerButTextBaseIsUndefined

Found a .text relative pointer, but the .text base is undefined.

§

DataRelativePointerButDataBaseIsUndefined

Found a data relative pointer, but the data base is undefined.

§

FuncRelativePointerInBadContext

Found a function relative pointer in a context that does not have a function base.

§

CannotParseOmitPointerEncoding

Cannot parse a pointer with a DW_EH_PE_omit encoding.

§

BadUnsignedLeb128

An error parsing an unsigned LEB128 value.

§

BadSignedLeb128

An error parsing a signed LEB128 value.

§

AbbreviationTagZero

An abbreviation declared that its tag is zero, but zero is reserved for null records.

§

AttributeNameZero

An attribute specification declared that its name is zero, but zero is reserved for null records.

§

AttributeFormZero

An attribute specification declared that its form is zero, but zero is reserved for null records.

§

InvalidAbbreviationChildren(DwChildren)

The abbreviation’s has-children byte was not one of DW_CHILDREN_{yes,no}.

§

UnknownForm(DwForm)

Found an unknown DW_FORM_* type.

§

DuplicateAbbreviationCode(u64)

Found an abbreviation code that has already been used.

§

UnknownReservedLength(u32)

Found an unknown reserved length value.

§

UnknownVersion(u64)

Found an unknown DWARF version.

§

InvalidAbbreviationCode(u64)

Found an entry with an invalid abbreviation code.

§

UnexpectedEof(ReaderOffsetId)

Hit the end of input before it was expected.

§

UnknownLocListsEntry(DwLle)

Found an unknown location-lists format.

§

UnknownRangeListsEntry(DwRle)

Found an unknown range-lists format.

§

UnsupportedAddressSize(u8)

The specified address size is not supported.

§

UnsupportedOffsetSize(u8)

The specified offset size is not supported.

§

MinimumInstructionLengthZero

The minimum instruction length must not be zero.

§

MaximumOperationsPerInstructionZero

The maximum operations per instruction must not be zero.

§

LineRangeZero

The line range must not be zero.

§

OpcodeBaseZero

The opcode base must not be zero.

§

BadUtf8

Found an invalid UTF-8 string.

§

NotCieId(u64)

Expected to find the CIE ID, but found something else.

§

NotCiePointer(u64)

Expected to find a pointer to a CIE, but found the CIE ID instead.

§

BadBranchTarget(u64)

Invalid branch target for a DW_OP_bra or DW_OP_skip.

§

InvalidPushObjectAddress

DW_OP_push_object_address used but no address passed in.

§

NotEnoughStackItems

Not enough items on the stack when evaluating an expression.

§

TooManyIterations

Too many iterations to compute the expression.

§

InvalidExpression(DwOp)

An unrecognized operation was found while parsing a DWARF expression.

§

UnsupportedEvaluation

An unsupported operation was found while evaluating a DWARF expression.

§

InvalidPiece

The expression had a piece followed by an expression terminator without a piece.

§

InvalidExpressionTerminator(u64)

An expression-terminating operation was followed by something other than the end of the expression or a piece operation.

§

DivisionByZero

Division or modulus by zero when evaluating an expression.

§

TypeMismatch

An expression operation used mismatching types.

§

IntegralTypeRequired

An expression operation required an integral type but saw a floating point type.

§

UnsupportedTypeOperation

An expression operation used types that are not supported.

§

InvalidShiftExpression

The shift value in an expression must be a non-negative integer.

§

InvalidDerefSize(u8)

The size of a deref expression must not be larger than the size of an address.

§

UnknownCallFrameInstruction(DwCfa)

An unknown DW_CFA_* instruction.

§

InvalidCfiSetLoc(u64)

A DW_CFA_set_loc instruction moved the address backward.

§

AddressOverflow

An address calculation overflowed.

This is returned in cases where the address is expected to be larger than a previous address, but the calculation overflowed.

§

CfiInstructionInInvalidContext

Encountered a call frame instruction in a context in which it is not valid.

§

PopWithEmptyStack

When evaluating call frame instructions, found a DW_CFA_restore_state stack pop instruction, but the stack was empty, and had nothing to pop.

§

NoUnwindInfoForAddress

Do not have unwind info for the given address.

§

UnsupportedOffset

An offset value was larger than the maximum supported value.

§

UnknownPointerEncoding(DwEhPe)

The given pointer encoding is either unknown or invalid.

§

NoEntryAtGivenOffset(u64)

Did not find an entry at the given offset.

§

OffsetOutOfBounds(u64)

The given offset is out of bounds.

§

UnknownAugmentation

Found an unknown CFI augmentation.

§

UnsupportedPointerEncoding(DwEhPe)

We do not support the given pointer encoding yet.

§

UnsupportedIndirectPointer

We do not support dereferencing indirect pointers.

§

UnsupportedRegister(u64)

Registers larger than u16 are not supported.

§

TooManyRegisterRules

The CFI program defined more register rules than we have storage for.

§

StackFull

Attempted to push onto the CFI or evaluation stack, but it was already at full capacity.

§

UnknownUnitType(DwUt)

The DW_UT_* value for this unit is not supported yet.

§

UnsupportedSegmentSize(u8)

Nonzero segment selector sizes aren’t supported yet.

§

MissingUnitDie

A compilation unit or type unit is missing its top level DIE.

§

MissingSplitUnit

A split DWARF section does not contain the split compilation unit.

§

UnsupportedAttributeForm(DwForm)

A DIE attribute used an unsupported form.

§

MissingFileEntryFormatPath

Missing DW_LNCT_path in file entry format.

§

ExpectedStringAttributeValue

Expected an attribute value to be a string form.

§

InvalidImplicitConst

An attribute with an indirect form cannot use DW_FORM_implicit_const.

§

UnsupportedIndexSectionCount(u32)

Invalid section count in .dwp index.

§

InvalidIndexSlotCount(u32)

Invalid slot count in .dwp index.

§

InvalidIndexRow(u32)

Invalid row index in .dwp index.

§

UnknownIndexSection(DwSect)

Unknown section type in .dwp index.

§

UnknownIndexSectionV2(DwSectV2)

Unknown section type in version 2 .dwp index.

§

InvalidMacinfoType(DwMacinfo)

Invalid macinfo type in .debug_macinfo.

§

InvalidMacroType(DwMacro)

Invalid macro type in .debug_macro.

§

UnsupportedOpcodeOperandsTable

The optional opcode_operands_table in .debug_macro is currently not supported.

§

InvalidNameAttributeIndex(u64)

Invalid index in a .debug_names attribute value.

Trait Implementations§

Source§

impl Clone for Error

Source§

fn clone(&self) -> Error

Returns a duplicate 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 Error

Source§

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

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

impl Display for Error

Source§

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

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

impl Error for Error

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for ConvertError

Source§

fn from(e: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Available on crate feature std only.
Source§

fn from(_: Error) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Error

Source§

fn eq(&self, other: &Error) -> 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 Copy for Error

Source§

impl Eq for Error

Source§

impl StructuralPartialEq for Error

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

§

impl UnwindSafe for Error

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.