Struct symbolic::debuginfo::sourcebundle::SourceBundle
source · pub struct SourceBundle<'data> { /* private fields */ }
Expand description
A bundle of source code files.
To create a source bundle, see SourceBundleWriter
. For more information, see the module
level documentation.
Implementations§
source§impl<'data> SourceBundle<'data>
impl<'data> SourceBundle<'data>
sourcepub fn parse(
data: &'data [u8]
) -> Result<SourceBundle<'data>, SourceBundleError>
pub fn parse( data: &'data [u8] ) -> Result<SourceBundle<'data>, SourceBundleError>
Tries to parse a SourceBundle
from the given slice.
sourcepub fn version(&self) -> SourceBundleVersion
pub fn version(&self) -> SourceBundleVersion
Returns the version of this source bundle format.
sourcepub fn file_format(&self) -> FileFormat
pub fn file_format(&self) -> FileFormat
The container file format, which is always FileFormat::SourceBundle
.
sourcepub fn code_id(&self) -> Option<CodeId>
pub fn code_id(&self) -> Option<CodeId>
The code identifier of this object.
This is only set if the source bundle was created from an ObjectLike
. It can also be set
in the SourceBundleWriter
by setting the "code_id"
attribute.
sourcepub fn debug_id(&self) -> DebugId
pub fn debug_id(&self) -> DebugId
The code identifier of this object.
This is only set if the source bundle was created from an ObjectLike
. It can also be set
in the SourceBundleWriter
by setting the "debug_id"
attribute.
sourcepub fn name(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
The debug file name of this object.
This is only set if the source bundle was created from an ObjectLike
. It can also be set
in the SourceBundleWriter
by setting the "object_name"
attribute.
sourcepub fn arch(&self) -> Arch
pub fn arch(&self) -> Arch
The CPU architecture of this object.
This is only set if the source bundle was created from an ObjectLike
. It can also be set
in the SourceBundleWriter
by setting the "arch"
attribute.
sourcepub fn load_address(&self) -> u64
pub fn load_address(&self) -> u64
The address at which the image prefers to be loaded into memory.
Because source bundles do not contain this information is always 0
.
sourcepub fn has_symbols(&self) -> bool
pub fn has_symbols(&self) -> bool
Determines whether this object exposes a public symbol table.
Source bundles never have symbols.
sourcepub fn symbols(&self) -> Empty<Symbol<'data>> ⓘ
pub fn symbols(&self) -> Empty<Symbol<'data>> ⓘ
Returns an iterator over symbols in the public symbol table.
sourcepub fn symbol_map(&self) -> SymbolMap<'data>
pub fn symbol_map(&self) -> SymbolMap<'data>
Returns an ordered map of symbols in the symbol table.
sourcepub fn has_debug_info(&self) -> bool
pub fn has_debug_info(&self) -> bool
Determines whether this object contains debug information.
Source bundles never have debug info.
sourcepub fn debug_session(
&self
) -> Result<SourceBundleDebugSession<'data>, SourceBundleError>
pub fn debug_session( &self ) -> Result<SourceBundleDebugSession<'data>, SourceBundleError>
Constructs a debugging session.
A debugging session loads certain information from the object file and creates caches for efficient access to various records in the debug information. Since this can be quite a costly process, try to reuse the debugging session as long as possible.
sourcepub fn has_unwind_info(&self) -> bool
pub fn has_unwind_info(&self) -> bool
Determines whether this object contains stack unwinding information.
sourcepub fn has_sources(&self) -> bool
pub fn has_sources(&self) -> bool
Determines whether this object contains embedded source.
sourcepub fn is_malformed(&self) -> bool
pub fn is_malformed(&self) -> bool
Determines whether this object is malformed and was only partially parsed
Trait Implementations§
source§impl<'slf, 'data> AsSelf<'slf> for SourceBundle<'data>where
'data: 'slf,
impl<'slf, 'data> AsSelf<'slf> for SourceBundle<'data>where 'data: 'slf,
§type Ref = SourceBundle<'slf>
type Ref = SourceBundle<'slf>
Self
type with 'slf
lifetimes, returned by as_self
.