|
|
@ -75,20 +75,18 @@ Ethdebugger.prototype.extractLocalsAt = function (step) { |
|
|
|
return this.callTree.findScope(step) |
|
|
|
return this.callTree.findScope(step) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Ethdebugger.prototype.decodeLocalsAt = function (step, sourceLocation, callback) { |
|
|
|
Ethdebugger.prototype.decodeLocalsAt = async function (step, sourceLocation, callback) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const stack = this.traceManager.getStackAt(step) |
|
|
|
const stack = this.traceManager.getStackAt(step) |
|
|
|
const memory = this.traceManager.getMemoryAt(step) |
|
|
|
const memory = this.traceManager.getMemoryAt(step) |
|
|
|
const address = this.traceManager.getCurrentCalledAddressAt(step) |
|
|
|
const address = this.traceManager.getCurrentCalledAddressAt(step) |
|
|
|
try { |
|
|
|
try { |
|
|
|
const storageViewer = new StorageViewer({ stepIndex: step, tx: this.tx, address: address }, this.storageResolver, this.traceManager) |
|
|
|
const storageViewer = new StorageViewer({ stepIndex: step, tx: this.tx, address: address }, this.storageResolver, this.traceManager) |
|
|
|
localDecoder.solidityLocals(step, this.callTree, stack, memory, storageViewer, sourceLocation).then((locals) => { |
|
|
|
const locals = await localDecoder.solidityLocals(step, this.callTree, stack, memory, storageViewer, sourceLocation) |
|
|
|
if (!locals.error) { |
|
|
|
if (locals.error) { |
|
|
|
callback(null, locals) |
|
|
|
return callback(locals.error) |
|
|
|
} else { |
|
|
|
} |
|
|
|
callback(locals.error) |
|
|
|
return callback(null, locals) |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
|
callback(e.message) |
|
|
|
callback(e.message) |
|
|
|
} |
|
|
|
} |
|
|
|