ethdebug / format

Smart contract debugging data format – Standards development working group
https://ethdebug.github.io/format/
44 stars 4 forks source link

Local variables tracking #42

Open yann300 opened 9 months ago

yann300 commented 9 months ago

local variables (and params): The compiler should if possible returns all the ranges in the VM trace where a specific local is in the scope, and how to track its ref or value in the stack (this is perhaps the most important thing for us or at least this is where we spent most of the time..)

gnidan commented 5 months ago

For this, I imagine something like this pair of instruction annotations (note the use of parent as an example, to indicate how scopes are re-used/inherited):

operation:
  begin: scope
  id: 5
  parent: 4
  variables:
    x:
      type:
        kind: uint
        bits: 256

Then, later another instruction would be annotated with something like:

operation:
  scope: deallocate
  variables: ["x"]