pub struct WasmObject<'data> { /* private fields */ }
Expand description
Wasm object container (.wasm), used for executables and debug companions on web and wasi.
This can only parse binary wasm file and not wast files.
Implementations§
Source§impl<'data> WasmObject<'data>
impl<'data> WasmObject<'data>
Source§impl<'data> WasmObject<'data>
impl<'data> WasmObject<'data>
Sourcepub fn file_format(&self) -> FileFormat
pub fn file_format(&self) -> FileFormat
The container file format, which currently is always FileFormat::Wasm
.
Sourcepub fn code_id(&self) -> Option<CodeId>
pub fn code_id(&self) -> Option<CodeId>
The code identifier of this object.
Wasm does not yet provide code IDs.
Sourcepub fn debug_id(&self) -> DebugId
pub fn debug_id(&self) -> DebugId
The debug information identifier of a WASM file.
Wasm does not yet provide debug IDs.
Sourcepub fn kind(&self) -> ObjectKind
pub fn kind(&self) -> ObjectKind
The kind of this object.
Sourcepub fn load_address(&self) -> u64
pub fn load_address(&self) -> u64
The address at which the image prefers to be loaded into memory.
This is always 0 as this does not really apply to WASM.
Sourcepub fn has_symbols(&self) -> bool
pub fn has_symbols(&self) -> bool
Determines whether this object exposes a public symbol table.
Sourcepub fn symbols(&self) -> WasmSymbolIterator<'data, '_> ⓘ
pub fn symbols(&self) -> WasmSymbolIterator<'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.
Sourcepub fn debug_session(&self) -> Result<DwarfDebugSession<'data>, DwarfError>
pub fn debug_session(&self) -> Result<DwarfDebugSession<'data>, DwarfError>
Constructs a debugging session.
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
Sourcepub fn code_offset(&self) -> u64
pub fn code_offset(&self) -> u64
Returns the offset of the code section.