pub struct DebugProgram {
pub info: EthdebugInfo,
pub resources: Value,
pub source_contents: BTreeMap<u64, String>,
pub source_files: BTreeMap<u64, PathBuf>,
pub legacy: bool,
pub storage_layout: Option<StorageLayout>,
pub transient_storage_layout: Option<StorageLayout>,
pub missing_sources: Vec<String>,
}Expand description
One contract’s debug information as loaded from its artifacts.
Fields§
§info: EthdebugInfo§resources: ValueThe ETHDebug resources record: the compilation, types, and pointers.
source_contents: BTreeMap<u64, String>Source text by source id, for every source that could be read.
source_files: BTreeMap<u64, PathBuf>The file each source was read from; a source taken from the compilation record has none.
legacy: boolTrue when the program came from a legacy srcmap rather than ETHDebug.
storage_layout: Option<StorageLayout>The contract’s storage layout, when it was compiled with --storage-layout.
transient_storage_layout: Option<StorageLayout>Where its transient state variables live, from --transient-storage-layout.
missing_sources: Vec<String>Sources the artifact names that could not be read, so a frontend can say why its lines are missing instead of degrading to an opcode view without a word.
Implementations§
Source§impl DebugProgram
impl DebugProgram
Sourcepub const fn code_generator(&self) -> CodeGenerator
pub const fn code_generator(&self) -> CodeGenerator
The code generator the program came from. A legacy srcmap is taken to come from
the legacy pipeline, which is the only one that emits nothing else; ETHDebug comes
from solc’s via-IR pipeline or from a compiler built on IR.