Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
8bb7e18b
Commit
8bb7e18b
authored
Jul 22, 2020
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor decodeLocalsAt
parent
57f715f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
51 deletions
+18
-51
Ethdebugger.js
libs/remix-debug/src/Ethdebugger.js
+18
-51
No files found.
libs/remix-debug/src/Ethdebugger.js
View file @
8bb7e18b
...
@@ -88,58 +88,25 @@ Ethdebugger.prototype.extractLocalsAt = function (step, callback) {
...
@@ -88,58 +88,25 @@ Ethdebugger.prototype.extractLocalsAt = function (step, callback) {
}
}
Ethdebugger
.
prototype
.
decodeLocalsAt
=
function
(
step
,
sourceLocation
,
callback
)
{
Ethdebugger
.
prototype
.
decodeLocalsAt
=
function
(
step
,
sourceLocation
,
callback
)
{
const
self
=
this
try
{
this
.
traceManager
.
waterfall
([
const
stack
=
this
.
traceManager
.
getStackAt
(
step
)
function
getStackAt
(
stepIndex
,
callback
)
{
const
memory
=
this
.
traceManager
.
getMemoryAt
(
step
)
try
{
const
address
=
this
.
traceManager
.
getCurrentCalledAddressAt
(
step
)
const
result
=
self
.
traceManager
.
getStackAt
(
stepIndex
)
try
{
callback
(
null
,
result
)
const
storageViewer
=
new
StorageViewer
({
stepIndex
:
step
,
tx
:
this
.
tx
,
address
:
address
},
this
.
storageResolver
,
this
.
traceManager
)
}
catch
(
error
)
{
localDecoder
.
solidityLocals
(
step
,
this
.
callTree
,
stack
,
memory
,
storageViewer
,
sourceLocation
).
then
((
locals
)
=>
{
callback
(
error
)
if
(
!
locals
.
error
)
{
}
callback
(
null
,
locals
)
},
}
else
{
function
getMemoryAt
(
stepIndex
,
callback
)
{
callback
(
locals
.
error
)
try
{
const
result
=
self
.
traceManager
.
getMemoryAt
(
stepIndex
)
callback
(
null
,
result
)
}
catch
(
error
)
{
callback
(
error
)
}
},
function
getCurrentCalledAddressAt
(
stepIndex
,
next
)
{
try
{
const
address
=
self
.
traceManager
.
getCurrentCalledAddressAt
(
stepIndex
)
next
(
null
,
address
)
}
catch
(
error
)
{
next
(
error
)
}
}],
step
,
(
error
,
result
)
=>
{
if
(
!
error
)
{
const
stack
=
result
[
0
].
value
const
memory
=
result
[
1
].
value
try
{
const
storageViewer
=
new
StorageViewer
({
stepIndex
:
step
,
tx
:
this
.
tx
,
address
:
result
[
2
].
value
},
this
.
storageResolver
,
this
.
traceManager
)
localDecoder
.
solidityLocals
(
step
,
this
.
callTree
,
stack
,
memory
,
storageViewer
,
sourceLocation
).
then
((
locals
)
=>
{
if
(
!
locals
.
error
)
{
callback
(
null
,
locals
)
}
else
{
callback
(
locals
.
error
)
}
})
}
catch
(
e
)
{
callback
(
e
.
message
)
}
}
}
else
{
})
callback
(
error
)
}
catch
(
e
)
{
}
callback
(
e
.
message
)
})
}
}
catch
(
error
)
{
callback
(
error
)
}
}
}
/* decode state */
/* decode state */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment