Skip to content

ethdebug: Build the semantic debug info side table of a contract - #7

Open
djolertrk wants to merge 1 commit into
feature/ethdebug-program-contextfrom
feature/ethdebug-semantic-builder
Open

djolertrk wants to merge 1 commit into
feature/ethdebug-program-contextfrom
feature/ethdebug-semantic-builder

Conversation

@djolertrk

Copy link
Copy Markdown
Collaborator

Build the side table specified in ethdebug_internal_debug_info.rst from analysis results: the scope record of the contract with its state variables, as the program-level context describes them, and the scope record of every function and modifier compiled into the contract with its parameters and return variables, together with the resources.

Parameters and return variables live on the stack, so their pointers are regions over the generated Yul locals of the unoptimized IR, which stand in for stack slots until Yul is compiled to EVM. A value with several stack slots is a group of regions named after its stack items.

The golden tests show the table as Contract.semantic, in the shape of its sidecar.

@djolertrk
djolertrk added this pull request to stack #6 October 5, 2026 08:17
@djolertrk

Copy link
Copy Markdown
Collaborator Author

cc @cameel

@djolertrk
djolertrk force-pushed the feature/ethdebug-semantic-builder branch from 8614dc6 to 45354aa Compare October 8, 2026 13:47
@djolertrk
djolertrk force-pushed the feature/ethdebug-semantic-builder branch from 45354aa to 71f3e88 Compare October 9, 2026 10:51
@djolertrk
djolertrk force-pushed the feature/ethdebug-semantic-builder branch 2 times, most recently from 852e78b to bd2152b Compare October 16, 2026 12:00
Build the side table specified in ethdebug_internal_debug_info.rst from
analysis results: the scope record of the contract with its state
variables, as the program-level context describes them, and the scope
record of every function and modifier compiled into the contract with
its parameters and return variables, together with the resources.

Parameters and return variables live on the stack, so their pointers
are regions over the generated Yul locals of the unoptimized IR, which
stand in for stack slots until Yul is compiled to EVM. A value with
several stack slots is a group of regions named after its stack items.

The golden tests show the table as Contract.semantic, in the shape of
its sidecar.
@djolertrk
djolertrk force-pushed the feature/ethdebug-semantic-builder branch from bd2152b to e120efe Compare October 19, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant