Skip to main content

Module source_map

Module source_map 

Source
Expand description

The legacy srcmap debug format.

Solidity compilers can emit source mappings as a compact s:l:f:j:m string alongside the bytecode, with fields inherited from the previous entry when omitted. This module parses that format and builds the program-counter index for it, which requires walking the bytecode so PUSH immediates are not mistaken for opcodes.

This is a fallback path. ETHDebug is the primary source of debug information and carries strictly more of it; prefer it whenever the compiler can produce it.

Structs§

SourceMapEntry
SourceMapInfo
SourceMapProgram
A legacy source-map program adapted to the common debug-info model.

Enums§

SourceMapEnvironment
The bytecode environment described by a legacy source map.

Functions§

build_pc_to_instruction_map
is_legacy_compiler
load_source_map_program
Loads one program from combined.json when the requested source map exists.
load_source_map_program_with_sources
The same, also looking for the sources it names in source_roots.
parse_srcmap