mirror of
https://github.com/status-im/ethereumj-personal.git
synced 2025-01-11 12:24:13 +00:00
VM: tracing fix
+ get back the log for memory/stack/storage on vm trace level.
This commit is contained in:
parent
5b48086ceb
commit
816402816e
@ -565,7 +565,7 @@ public class Program {
|
|||||||
|
|
||||||
public void fullTrace() {
|
public void fullTrace() {
|
||||||
|
|
||||||
if (logger.isDebugEnabled() || listener != null) {
|
if (logger.isTraceEnabled() || listener != null) {
|
||||||
|
|
||||||
StringBuilder stackData = new StringBuilder();
|
StringBuilder stackData = new StringBuilder();
|
||||||
for (int i = 0; i < stack.size(); ++i) {
|
for (int i = 0; i < stack.size(); ++i) {
|
||||||
@ -616,11 +616,11 @@ public class Program {
|
|||||||
if (pc >= ops.length) opsString.append(" >>");
|
if (pc >= ops.length) opsString.append(" >>");
|
||||||
if (opsString.length() > 0) opsString.insert(0, "\n ");
|
if (opsString.length() > 0) opsString.insert(0, "\n ");
|
||||||
|
|
||||||
logger.debug(" -- OPS -- {}", opsString);
|
logger.trace(" -- OPS -- {}", opsString);
|
||||||
logger.debug(" -- STACK -- {}", stackData);
|
logger.trace(" -- STACK -- {}", stackData);
|
||||||
logger.debug(" -- MEMORY -- {}", memoryData);
|
logger.trace(" -- MEMORY -- {}", memoryData);
|
||||||
logger.debug(" -- STORAGE -- {}\n", storageData);
|
logger.trace(" -- STORAGE -- {}\n", storageData);
|
||||||
logger.debug("\n Spent Gas: [ {} ]/[ {} ]\n Left Gas: [ {} ]\n",
|
logger.trace("\n Spent Gas: [ {} ]/[ {} ]\n Left Gas: [ {} ]\n",
|
||||||
result.getGasUsed(),
|
result.getGasUsed(),
|
||||||
invokeData.getGas().longValue(),
|
invokeData.getGas().longValue(),
|
||||||
getGas().longValue());
|
getGas().longValue());
|
||||||
|
@ -826,6 +826,9 @@ public class VM {
|
|||||||
logger.info(logString, stepBefore, String.format("%-12s", op.name()), program.getGas().longValue(),
|
logger.info(logString, stepBefore, String.format("%-12s", op.name()), program.getGas().longValue(),
|
||||||
program.invokeData.getCallDeep(), hint);
|
program.invokeData.getCallDeep(), hint);
|
||||||
|
|
||||||
|
program.fullTrace();
|
||||||
|
|
||||||
|
|
||||||
// program.fullTrace();
|
// program.fullTrace();
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
if(e instanceof OutOfGasException)
|
if(e instanceof OutOfGasException)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user