mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adding source location support to AssemblyStack and thus debugging Yul sources
This commit is contained in:
committed by
chriseth
parent
44bcff42f5
commit
ec083c4878
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user