Commit 35dd0a1a authored by aniket-engg's avatar aniket-engg

flag to track internal function calll

parent 2ab6293f
...@@ -122,7 +122,7 @@ class DebuggerStepManager { ...@@ -122,7 +122,7 @@ class DebuggerStepManager {
stepOverForward (solidityMode) { stepOverForward (solidityMode) {
if (!this.traceManager.isLoaded()) return if (!this.traceManager.isLoaded()) return
var step = this.traceManager.findStepOverForward(this.currentStepIndex) var step = this.traceManager.findStepOverForward(this.currentStepIndex, this.debugger.callTree.internalFunctionCalls.includes((this.currentStepIndex)))
if (solidityMode) { if (solidityMode) {
step = this.resolveToReducedTrace(step, 1) step = this.resolveToReducedTrace(step, 1)
} }
......
...@@ -239,8 +239,8 @@ TraceManager.prototype.findStepOverBack = function (currentStep) { ...@@ -239,8 +239,8 @@ TraceManager.prototype.findStepOverBack = function (currentStep) {
return this.traceStepManager.findStepOverBack(currentStep) return this.traceStepManager.findStepOverBack(currentStep)
} }
TraceManager.prototype.findStepOverForward = function (currentStep) { TraceManager.prototype.findStepOverForward = function (currentStep, isInternalCall = false) {
return this.traceStepManager.findStepOverForward(currentStep) return this.traceStepManager.findStepOverForward(currentStep, isInternalCall)
} }
TraceManager.prototype.findNextCall = function (currentStep) { TraceManager.prototype.findNextCall = function (currentStep) {
......
'use strict' 'use strict'
var traceHelper = require('../helpers/traceHelper') var traceHelper = require('../helpers/traceHelper')
var Debugger = require('../../../remix-debug').EthDebugger
var util = require('../util') var util = require('../util')
function TraceStepManager (_traceAnalyser, opts) { function TraceStepManager (_traceAnalyser, opts) {
this.traceAnalyser = _traceAnalyser this.traceAnalyser = _traceAnalyser
this.debugger = new Debugger({web3: opts.web3})
} }
TraceStepManager.prototype.isCallInstruction = function (index) { TraceStepManager.prototype.isCallInstruction = function (index) {
...@@ -28,8 +26,8 @@ TraceStepManager.prototype.findStepOverBack = function (currentStep) { ...@@ -28,8 +26,8 @@ TraceStepManager.prototype.findStepOverBack = function (currentStep) {
} }
} }
TraceStepManager.prototype.findStepOverForward = function (currentStep) { TraceStepManager.prototype.findStepOverForward = function (currentStep, isInternalCall) {
if (this.isCallInstruction(currentStep) || this.debugger.callTree.internalFunctionCalls.includes(currentStep)) { if (this.isCallInstruction(currentStep) || isInternalCall) {
var call = util.findCall(currentStep + 1, this.traceAnalyser.traceCache.callsTree.call) var call = util.findCall(currentStep + 1, this.traceAnalyser.traceCache.callsTree.call)
return call.return + 1 < this.traceAnalyser.trace.length ? call.return + 1 : this.traceAnalyser.trace.length - 1 return call.return + 1 < this.traceAnalyser.trace.length ? call.return + 1 : this.traceAnalyser.trace.length - 1
} else { } else {
......
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