Skip to main content

Error

Enum Error 

Source
#[non_exhaustive]
pub enum Error {
Show 46 variants ReadInput(Error), ParseFileKind(Error), ParseObjectFile(Error), ParseArchiveFile(Error), ParseArchiveMember(Error), InvalidInputKind, DecompressData(Error), NamelessSection(Error, usize), RelocationWithInvalidSymbol(String, usize), MultipleRelocations(String, usize), UnsupportedRelocation(String, usize), MissingDwoName(u64), NoCompilationUnits, NoDie, TopLevelDieNotUnit, MissingRequiredSection(&'static str), ParseUnitAbbreviations(Error), ParseUnitHeader(Error), ParseUnit(Error), IncompatibleIndexVersion(String, u16, u16), OffsetAtIndex(Error, u64), StrAtOffset(Error, usize), ParseIndex(Error, String), UnitNotInIndex(u64), RowNotInIndex(Error, u32), SectionNotInRow, ContributionOutOfBounds(Contribution, usize), EmptyUnit(u64), MultipleDebugInfoSection, MultipleDebugTypesSection, NotSplitUnit, DuplicateUnit(u64), MissingReferencedUnit(u64), NoOutputObjectCreated, MixedInputEncodings, UnsupportedLocListsEntry(u8), MalformedDebugInfo, UnsupportedForm(u16), UnexpectedSectionAbsoluteReference, GcNotInitialized, GcSharedDwarf4Ranges(DwoId), Io(Error), ObjectRead(Error), ObjectWrite(Error), GimliRead(Error), GimliWrite(Error),
}
Expand description

Diagnostics (and contexts) emitted during DWARF packaging.

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.
§

ReadInput(Error)

Failure to read input file.

This error occurs in the Session::read_input function provided by the user of thorin.

§

ParseFileKind(Error)

Failed to parse kind of input file.

Input file kind is necessary to determine how to parse the rest of the input, and to validate that the input file is of a type that thorin can process.

§

ParseObjectFile(Error)

Failed to parse object file.

§

ParseArchiveFile(Error)

Failed to parse archive file.

§

ParseArchiveMember(Error)

Failed to parse archive member.

§

InvalidInputKind

Invalid kind of input.

Only archive and elf files are supported input files.

§

DecompressData(Error)

Failed to decompress data.

thorin uses object for decompression, so object probably didn’t have support for the type of compression used.

§

NamelessSection(Error, usize)

Section without a name.

§

RelocationWithInvalidSymbol(String, usize)

Relocation has invalid symbol for a section.

§

MultipleRelocations(String, usize)

Multiple relocations for a section.

§

UnsupportedRelocation(String, usize)

Unsupported relocations for a section.

§

MissingDwoName(u64)

Input object that has a DwoId (or DebugTypeSignature) does not have a DW_AT_GNU_dwo_name or DW_AT_dwo_name attribute.

§

NoCompilationUnits

Input object has no compilation units.

§

NoDie

No top-level debugging information entry in unit.

§

TopLevelDieNotUnit

Top-level debugging information entry is not a compilation/type unit.

§

MissingRequiredSection(&'static str)

Section required of input DWARF objects was missing.

§

ParseUnitAbbreviations(Error)

Failed to parse unit abbreviations.

§

ParseUnitHeader(Error)

Failed to parse unit header.

§

ParseUnit(Error)

Failed to parse unit.

§

IncompatibleIndexVersion(String, u16, u16)

Input DWARF package has a different index version than the version being output.

§

OffsetAtIndex(Error, u64)

Failed to read string offset from .debug_str_offsets at index.

§

StrAtOffset(Error, usize)

Failed to read string from .debug_str at offset.

§

ParseIndex(Error, String)

Failed to parse index section.

If an input file is a DWARF package, its index section needs to be read to ensure that the contributions within it are preserved.

§

UnitNotInIndex(u64)

Compilation unit in DWARF package is not its index.

§

RowNotInIndex(Error, u32)

Row for a compilation unit is not in the index.

§

SectionNotInRow

Section not found in unit’s row in index, i.e. a DWARF package contains a section but its index doesn’t record contributions to it.

§

ContributionOutOfBounds(Contribution, usize)

§

EmptyUnit(u64)

Compilation unit in input DWARF object has no content.

§

MultipleDebugInfoSection

Found multiple .debug_info.dwo sections.

§

MultipleDebugTypesSection

Found multiple .debug_types.dwo sections in a DWARF package file.

§

NotSplitUnit

Found a regular compilation unit in a DWARF object.

§

DuplicateUnit(u64)

Found duplicate split compilation unit.

§

MissingReferencedUnit(u64)

Unit referenced by an executable was not found.

§

NoOutputObjectCreated

No output object was created from inputs

§

MixedInputEncodings

Input objects have different encodings.

§

UnsupportedLocListsEntry(u8)

A DW_LLE value was unrecognized.

§

MalformedDebugInfo

.debug_info.dwo compilation unit is malformed or truncated during GC.

§

UnsupportedForm(u16)

An abbreviation form encountered during GC byte-level rewriting is not supported.

§

UnexpectedSectionAbsoluteReference

A section-absolute reference was found where not expected.

§

GcNotInitialized

GC input object or executable added without prior preprocess_gc_executable call.

§

GcSharedDwarf4Ranges(DwoId)

A .dwo is referenced by multiple executables that supply DWARF4 .debug_ranges.

DWARF4 range lists hold raw addresses that live in the linked executable. When several executables reference the same .dwo, each has its own (independently tombstoned) .debug_ranges, but the GC currently only supports consulting one of them. Proceeding could prune a range list still live in a different executable.

§

Io(Error)

Catch-all for std::io::Error.

§

ObjectRead(Error)

Catch-all for object::Error.

§

ObjectWrite(Error)

Catch-all for object::write::Error.

§

GimliRead(Error)

Catch-all for gimli::read::Error.

§

GimliWrite(Error)

Catch-all for gimli::write::Error.

Trait Implementations§

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

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

impl Error for Error

Source§

fn source(&self) -> Option<&(dyn StdError + '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 Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more