Enum thorin::Error[−][src]

#[non_exhaustive]
pub enum Error {
Show 40 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), ParseUnitAttribute(Error), ParseUnitHeader(Error), ParseUnit(Error), IncompatibleIndexVersion(String, u16, u16), OffsetAtIndex(Error, u64), StrAtOffset(Error, usize), ParseIndex(Error, String), UnitNotInIndex(u64), RowNotInIndex(Error, u32), SectionNotInRow, EmptyUnit(u64), MultipleDebugInfoSection, MultipleDebugTypesSection, NotSplitUnit, DuplicateUnit(u64), MissingReferencedUnit(u64), NoOutputObjectCreated, MixedInputEncodings, 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)

Tuple Fields

0: Error

Failure to read input file.

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

ParseFileKind(Error)

Tuple Fields

0: 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)

Tuple Fields

0: Error

Failed to parse object file.

ParseArchiveFile(Error)

Tuple Fields

0: Error

Failed to parse archive file.

ParseArchiveMember(Error)

Tuple Fields

0: Error

Failed to parse archive member.

InvalidInputKind

Invalid kind of input.

Only archive and elf files are supported input files.

DecompressData(Error)

Tuple Fields

0: 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)

Tuple Fields

0: Error
1: usize

Section without a name.

RelocationWithInvalidSymbol(String, usize)

Tuple Fields

0: String
1: usize

Relocation has invalid symbol for a section.

MultipleRelocations(String, usize)

Tuple Fields

0: String
1: usize

Multiple relocations for a section.

UnsupportedRelocation(String, usize)

Tuple Fields

0: String
1: usize

Unsupported relocations for a section.

MissingDwoName(u64)

Tuple Fields

0: 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)

Tuple Fields

0: &'static str

Section required of input DWARF objects was missing.

ParseUnitAbbreviations(Error)

Tuple Fields

0: Error

Failed to parse unit abbreviations.

ParseUnitAttribute(Error)

Tuple Fields

0: Error

Failed to parse unit attribute.

ParseUnitHeader(Error)

Tuple Fields

0: Error

Failed to parse unit header.

ParseUnit(Error)

Tuple Fields

0: Error

Failed to parse unit.

IncompatibleIndexVersion(String, u16, u16)

Tuple Fields

0: String
1: u16
2: u16

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

OffsetAtIndex(Error, u64)

Tuple Fields

0: Error
1: u64

Failed to read string offset from .debug_str_offsets at index.

StrAtOffset(Error, usize)

Tuple Fields

0: Error
1: usize

Failed to read string from .debug_str at offset.

ParseIndex(Error, String)

Tuple Fields

0: Error
1: 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)

Tuple Fields

0: u64

Compilation unit in DWARF package is not its index.

RowNotInIndex(Error, u32)

Tuple Fields

0: Error
1: 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.

EmptyUnit(u64)

Tuple Fields

0: 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)

Tuple Fields

0: u64

Found duplicate split compilation unit.

MissingReferencedUnit(u64)

Tuple Fields

0: u64

Unit referenced by an executable was not found.

NoOutputObjectCreated

No output object was created from inputs

MixedInputEncodings

Input objects have different encodings.

Io(Error)

Tuple Fields

0: Error

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

ObjectRead(Error)

Tuple Fields

0: Error

Catch-all for object::Error.

ObjectWrite(Error)

Tuple Fields

0: Error

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

GimliRead(Error)

Tuple Fields

0: Error

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

GimliWrite(Error)

Tuple Fields

0: Error

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

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

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

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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