Skip to main content

Module metadata

Module metadata 

Source
Expand description

ETHDebug artifact model: instructions, source spans, and variable locations.

An ETHDebug runtime artifact is a list of instructions, each carrying its program counter and a context describing the source range it was generated from. Mapping a program counter back to Solidity means finding its instruction and reading that span.

Spans nest: a compiler attaches a whole-contract range to dispatcher and preamble instructions, so a span containing a given line is not the same thing as a span generated for it. Callers that resolve a source line to a program counter must rank candidates accordingly rather than taking the first intersecting span.

Structs§

EthdebugInfo
EthdebugSpec
FunctionIdentity
Instruction
One instruction of a program and what the compiler says about it.
SourceLocation
SourceMapContext
What a legacy source map says about one instruction, as the ETHDebug context {"modifierDepth": .., "code": .., "invoke" | "return": {}} says it.
VariableLocation

Enums§

FunctionExit
SourceMapJump
The jump a legacy source map says an instruction makes.

Functions§

parse_compilation_sources
Maps every source id listed in an ETHDebug compilation object to its path.
parse_ethdebug_spec
parse_multi_contract_spec
parse_single_contract_spec
parse_variable_locations
read_compilation_source
Returns the contents of a source embedded in an ETHDebug compilation object.
source_range
The ETHDebug source range of length bytes at offset in source source_id, as an instruction context carries it under code.