Commit da0c0c7c authored by yann300's avatar yann300

jump to the start of the fn call

parent e62acd8d
......@@ -39,6 +39,9 @@ function StepManager (_parent, _traceManager) {
this.parent.vmDebugger.asmCode.event.register('show', () => {
this.solidityMode = false
})
if (this.parent.callTree.functionCallStack.length) {
this.jumpTo(this.parent.callTree.functionCallStack[0])
}
})
this.buttonNavigator = new ButtonNavigator(_parent, this.traceManager)
......
......@@ -57,6 +57,7 @@ class InternalCallTree {
/*
scopeStart: represent start of a new scope. Keys are index in the vmtrace, values are scopeId
*/
this.functionCallStack = []
this.scopeStarts = {}
this.variableDeclarationByFile = {}
this.functionDefinitionByFile = {}
......@@ -196,6 +197,7 @@ function includeVariableDeclaration (tree, step, sourceLocation, scopeId, newLoc
}
var functionDefinition = resolveFunctionDefinition(tree, step, previousSourceLocation)
if (functionDefinition && newLocation && traceHelper.isJumpDestInstruction(tree.traceManager.trace[step - 1])) {
tree.functionCallStack.push(step)
// means: the previous location was a function definition && JUMPDEST
// => we are at the beginning of the function and input/output are setup
tree.solidityProxy.contractNameAt(step, (error, contractName) => { // cached
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment