From 3273e865ecf5755f8f74d1db3e8bf283de1efe0d Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 14 Jun 2017 13:30:34 +0100 Subject: Print assembly even if there's no data section --- libevmasm/Assembly.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libevmasm/Assembly.cpp') diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp index ea061a30..72571b56 100644 --- a/libevmasm/Assembly.cpp +++ b/libevmasm/Assembly.cpp @@ -315,8 +315,10 @@ Json::Value Assembly::streamAsmJson(ostream& _out, StringMap const& _sourceCodes data[hexStr.str()] = m_subs[i]->stream(_out, "", _sourceCodes, true); } root[".data"] = data; - _out << root; } + + _out << root; + return root; } -- cgit v1.2.3 From 585b3ea3e3197e05349c13d24a3d99fba2fee887 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 14 Jun 2017 13:31:04 +0100 Subject: Print auxiliary data in the assembly --- libevmasm/Assembly.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libevmasm/Assembly.cpp') diff --git a/libevmasm/Assembly.cpp b/libevmasm/Assembly.cpp index 72571b56..f2a292b0 100644 --- a/libevmasm/Assembly.cpp +++ b/libevmasm/Assembly.cpp @@ -216,6 +216,9 @@ ostream& Assembly::streamAsm(ostream& _out, string const& _prefix, StringMap con } } + if (m_auxiliaryData.size() > 0) + _out << endl << _prefix << "auxdata: 0x" << toHex(m_auxiliaryData) << endl; + return _out; } @@ -317,6 +320,9 @@ Json::Value Assembly::streamAsmJson(ostream& _out, StringMap const& _sourceCodes root[".data"] = data; } + if (m_auxiliaryData.size() > 0) + root[".auxdata"] = toHex(m_auxiliaryData); + _out << root; return root; -- cgit v1.2.3