Module symbolic_debuginfo::sourcebundle[][src]

Support for Source Bundles, a proprietary archive containing source code.

This module defines the SourceBundle type. Since not all object file containers specify a standardized way to inline sources into debug information, this can be used to associate source contents to debug files.

Source bundles are ZIP archives with a well-defined internal structure. Most importantly, they contain source files in a nested directory structure. Additionally, there is meta data associated to every source file, which allows to store additional properties, such as the original file system path, a web URL, and custom headers.

The internal structure is as follows:

manifest.json
files/
  file1.txt
  subfolder/
    file2.txt

SourceBundle implements the ObjectLike trait. When created from another object, it carries over its meta data, such as the debug_id or code_id. However, source bundles never store symbols or debug information. To obtain sources or iterate files stored in this source bundle, use SourceBundle::debug_session.

Source bundles can be created manually or by converting any ObjectLike using SourceBundleWriter.

Structs

SourceBundle

A bundle of source code files.

SourceBundleDebugSession

Debug session for SourceBundle objects.

SourceBundleError

An error returned when handling SourceBundle.

SourceBundleFileIterator

An iterator over source files in a SourceBundle object.

SourceBundleVersion

Version number of a SourceBundle.

SourceBundleWriter

Writer to create SourceBundles.

SourceFileInfo

Meta data information of a file in a SourceBundle.

Enums

SourceBundleErrorKind

The error type for SourceBundleError.

SourceFileType

The type of a SourceFileInfo.

Type Definitions

SourceBundleFunctionIterator

An iterator over functions in a SourceBundle object.

SourceBundleSymbolIterator

An iterator yielding symbols from a source bundle.