Adding source location support to AssemblyStack and thus debugging Yul sources

This commit is contained in:
Djordje Mijovic
2020-02-25 22:19:03 +01:00
committed by chriseth
parent 44bcff42f5
commit ec083c4878
29 changed files with 136 additions and 101 deletions
+3
View File
@@ -74,6 +74,7 @@ TestCase::TestResult ObjectCompilerTest::run(ostream& _stream, string const& _li
MachineAssemblyObject obj = stack.assemble(AssemblyStack::Machine::EVM);
solAssert(obj.bytecode, "");
solAssert(obj.sourceMappings, "");
m_obtainedResult = "Assembly:\n" + obj.assembly;
if (obj.bytecode->bytecode.empty())
@@ -84,6 +85,8 @@ TestCase::TestResult ObjectCompilerTest::run(ostream& _stream, string const& _li
toHex(obj.bytecode->bytecode) +
"\nOpcodes: " +
boost::trim_copy(evmasm::disassemble(obj.bytecode->bytecode)) +
"\nSourceMappings:" +
(obj.sourceMappings->empty() ? "" : " " + *obj.sourceMappings) +
"\n";
if (m_expectation != m_obtainedResult)