Skip to content

ethdebug: Emit type documents and state variable pointers - #1

Open
djolertrk wants to merge 1 commit into
feature/ethdebug-explicit-debuginfofrom
feature/ethdebug-resources
Open

ethdebug: Emit type documents and state variable pointers#1
djolertrk wants to merge 1 commit into
feature/ethdebug-explicit-debuginfofrom
feature/ethdebug-resources

Conversation

@djolertrk

Copy link
Copy Markdown
Collaborator

Populate ethdebug/format/info/resources from analysis results: every referenced type as an ethdebug/format/type document keyed by the compiler's type identifier, and the pointer of every state variable in storage and transient storage as a reusable template, derived from the storage layout (packing, mappings, dynamic arrays, bytes/string encodings, structs). Mapping keys become template parameters the consumer binds.

The internal model behind this is the semantic debug info side table specified in docs/internals/ethdebug_internal_debug_info.rst: scope records keyed by (AST ID, instance) with variables carrying identity, declaration range, type reference, phase and an ethdebug pointer, plus a versioned serialization of the table checked strictly against the public pointer schema. Numeric source IDs match the ethdebug.compilation record.

State variables whose pointer is closed, i.e. reads no template parameter and no generated Yul local, are also published in the program-level context of the ethdebug program outputs, with their declaration and type reference.

…m-level context

Populate ethdebug/format/info/resources from analysis results: every
referenced type as an ethdebug/format/type document keyed by the
compiler's type identifier, and the pointer of every state variable in
storage and transient storage as a reusable template, derived from the
storage layout (packing, mappings, dynamic arrays, bytes/string
encodings, structs). Mapping keys become template parameters the
consumer binds.

The internal model behind this is the semantic debug info side table
specified in docs/internals/ethdebug_internal_debug_info.rst: scope
records keyed by (AST ID, instance) with variables carrying identity,
declaration range, type reference, phase and an ethdebug pointer, plus
a versioned serialization of the table checked strictly against the
public pointer schema. Numeric source IDs match the ethdebug.compilation
record.

State variables whose pointer is closed, i.e. reads no template
parameter and no generated Yul local, are also published in the
program-level context of the ethdebug program outputs, with their
declaration and type reference.
@djolertrk

Copy link
Copy Markdown
Collaborator Author

goes after the argotorg#16961

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