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
06574702
Commit
06574702
authored
Sep 14, 2017
by
yann300
Committed by
GitHub
Sep 14, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #570 from ethereum/improveDebuggerStart
Improve debugger start
parents
89a70efb
da0c0c7c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
StepManager.js
src/ui/StepManager.js
+3
-0
VmDebugger.js
src/ui/VmDebugger.js
+8
-0
internalCallTree.js
src/util/internalCallTree.js
+2
-0
No files found.
src/ui/StepManager.js
View file @
06574702
...
...
@@ -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
)
...
...
src/ui/VmDebugger.js
View file @
06574702
...
...
@@ -54,6 +54,14 @@ function VmDebugger (_parent, _traceManager, _codeManager, _solidityProxy, _call
_parent
.
event
.
register
(
'traceUnloaded'
,
this
,
function
()
{
self
.
view
.
style
.
display
=
'none'
})
_parent
.
callTree
.
event
.
register
(
'callTreeReady'
,
()
=>
{
if
(
_parent
.
callTree
.
reducedTrace
.
length
)
{
self
.
solidityLocals
.
basicPanel
.
show
()
self
.
solidityState
.
basicPanel
.
show
()
}
else
{
self
.
asmCode
.
basicPanel
.
show
()
}
})
}
VmDebugger
.
prototype
.
render
=
function
()
{
...
...
src/util/internalCallTree.js
View file @
06574702
...
...
@@ -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
...
...
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