Post

New blog post out! ethdebug is an open format for compilers to explain their output in a developer's own language. Our first post about it on the Argot blog covers this year's progress, with interactive visuals that run on actual compiler output.

These compilers now produce ethdebug data: • solc has produced ethdebug source ranges since 0.8.29, with storage variables coming soon • Fe outputs ethdebug source ranges for most instructions, even with the optimizer on • Solar produces ethdebug source ranges, even with the optimizer on

Tools are reading it too now: • Walnut's soldb reads ethdebug, and • Runtime Verification started a Python library for it. soldb was designed for Solidity, yet it also works with Fe's ethdebug output out of the box.

The second half of the post runs you through interactive visuals. It starts with how ethdebug enables tools to stop guessing at compiler rules, because the compiler now writes them down. From there, it shows how a debugger can read this to step through compiled code.

Next it follows a variable's bytes, from its storage slot down to packed fields and strings. And finally, it covers some harder cases for debugging, too: locals that move between stack and memory as code runs, and bytes the optimizer reuses for multiple variables.

No replies yet.