Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/compiler-guide/ethdebug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ It describes how the compiler derives the :ref:`ethdebug output <ethdebug>` from
.. note::
The debug info that is passed from the Solidity frontend through Yul is specified in :doc:`ethdebug_internal_debug_info`.

The documents are modelled as data structures in ``libevmasm/EthdebugSchema.h``, one per schema, and serialized to JSON from there.
The documents are modelled as data structures in ``liblangutil/EthdebugSchema.h``, one per schema, and serialized to JSON from there.
The constructors of the parts assert the constraints of the schemas, so that the compiler cannot assemble a document that does not serialize.
The frontend side, ``libsolidity/interface/Ethdebug.cpp``, builds the type documents and the pointer templates of a contract from its AST and types.

Expand Down
5 changes: 3 additions & 2 deletions docs/compiler-guide/ethdebug_internal_debug_info.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ The scope record therefore carries declaration identity, type, and initial recov
- Identity of the source-language declaration.
Synthetic bindings may omit it.
* - ``declarationSourceRange``
- optional ``SourceLocation``
- Source range of the declaration.
- optional ethdebug ``materials::SourceRange``
- Source range of the declaration: the numeric source ID of the ``ethdebug.compilation`` record with the byte offset and length.
``SourceLocation`` identifies sources by name, which the sidecar never uses as an ID.
* - ``typeID``
- optional string
- Key of the variable's document in ``ethdebug.resources.types``.
Expand Down
2 changes: 0 additions & 2 deletions libevmasm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ set(sources
AssemblyItem.h
Ethdebug.cpp
Ethdebug.h
EthdebugSchema.cpp
EthdebugSchema.h
EVMAssemblyStack.cpp
EVMAssemblyStack.h
BlockDeduplicator.cpp
Expand Down
2 changes: 1 addition & 1 deletion libevmasm/Ethdebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <libevmasm/Ethdebug.h>

#include <libevmasm/EthdebugSchema.h>
#include <liblangutil/EthdebugSchema.h>

#include <libsolutil/Keccak256.h>

Expand Down
5 changes: 4 additions & 1 deletion libevmasm/Ethdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@
#include <libsolutil/JSON.h>

#include <libevmasm/Assembly.h>
#include <libevmasm/EthdebugSchema.h>
#include <liblangutil/EthdebugSchema.h>
#include <libevmasm/LinkerObject.h>

#include <map>

namespace solidity::evmasm::ethdebug
{

// The schema structures live in liblangutil, next to the debug data that carries them.
namespace schema = langutil::ethdebug::schema;

struct Source
{
unsigned id;
Expand Down
Loading
Loading