-
Notifications
You must be signed in to change notification settings - Fork 8
Description
The ethdebug/format/program/context schema allows associating contexts with arbitrary "frame" string values, e.g., to indicate with "frame": "ir"
that the context refers to Yul sources instead of Solidity sources.
Currently, this format doesn't cover the scope of what makes a valid value for a frame, i.e., the format treats "frame": "..."
as an opaque string. Not providing semantic guidance here creates the risk that different compilers will use different values for effectively the same idea (e.g., "yul"
vs. "ir"
vs. "IR"
, etc.), thus increasing the burden on debuggers to have compiler-specific lookup tables or some other kind of heuristics.
This concern was raised in a recent community call discussion, where we mostly concluded that establishing semantics here is tricky.
One idea I've had for addressing this concern: update the format to require compilers to include a static list of possible frame values in the ethdebug/fomaterials/compilation schema output. I could see this being useful especially if we could define semantics enough to say, e.g., "{ "frame": "yul" }
indicates an intermediary representation whose sources are in the Yul language"