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
76f8485b
Commit
76f8485b
authored
Feb 27, 2017
by
chriseth
Committed by
GitHub
Feb 27, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #209 from ethereum/breakpointNext
Breakpoints
parents
0b8ca9bb
c24ee2f6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
breakpointManager.js
src/code/breakpointManager.js
+8
-5
No files found.
src/code/breakpointManager.js
View file @
76f8485b
...
@@ -56,11 +56,14 @@ class BreakpointManager {
...
@@ -56,11 +56,14 @@ class BreakpointManager {
return
trace
[
step
].
depth
!==
trace
[
step
-
1
].
depth
return
trace
[
step
].
depth
!==
trace
[
step
-
1
].
depth
}
}
function
hitLine
(
currentStep
,
sourceLocation
,
self
)
{
function
hitLine
(
currentStep
,
sourceLocation
,
previousSourceLocation
,
self
)
{
// isJumpDestInstruction -> returning from a internal function call
// isJumpDestInstruction -> returning from a internal function call
// depthChange -> returning from an external call
// depthChange -> returning from an external call
if
(
helper
.
isJumpDestInstruction
(
self
.
debugger
.
traceManager
.
trace
[
currentStep
])
||
// sourceLocation.start <= previousSourceLocation.start && ... -> previous src is contained in the current one
depthChange
(
currentStep
,
self
.
debugger
.
traceManager
.
trace
))
{
if
((
helper
.
isJumpDestInstruction
(
self
.
debugger
.
traceManager
.
trace
[
currentStep
])
&&
previousSourceLocation
.
jump
===
'o'
)
||
depthChange
(
currentStep
,
self
.
debugger
.
traceManager
.
trace
)
||
(
sourceLocation
.
start
<=
previousSourceLocation
.
start
&&
sourceLocation
.
start
+
sourceLocation
.
length
>=
previousSourceLocation
.
start
+
previousSourceLocation
.
length
))
{
return
false
return
false
}
else
{
}
else
{
self
.
debugger
.
stepManager
.
jumpTo
(
currentStep
)
self
.
debugger
.
stepManager
.
jumpTo
(
currentStep
)
...
@@ -85,7 +88,7 @@ class BreakpointManager {
...
@@ -85,7 +88,7 @@ class BreakpointManager {
if
(
this
.
previousLine
!==
lineColumn
.
start
.
line
)
{
if
(
this
.
previousLine
!==
lineColumn
.
start
.
line
)
{
if
(
direction
===
-
1
&&
lineHadBreakpoint
)
{
// TODO : improve this when we will build the correct structure before hand
if
(
direction
===
-
1
&&
lineHadBreakpoint
)
{
// TODO : improve this when we will build the correct structure before hand
lineHadBreakpoint
=
false
lineHadBreakpoint
=
false
if
(
hitLine
(
currentStep
+
1
,
previousSourceLocation
,
this
))
{
if
(
hitLine
(
currentStep
+
1
,
previousSourceLocation
,
sourceLocation
,
this
))
{
return
return
}
}
}
}
...
@@ -93,7 +96,7 @@ class BreakpointManager {
...
@@ -93,7 +96,7 @@ class BreakpointManager {
if
(
this
.
hasBreakpointAtLine
(
sourceLocation
.
file
,
lineColumn
.
start
.
line
))
{
if
(
this
.
hasBreakpointAtLine
(
sourceLocation
.
file
,
lineColumn
.
start
.
line
))
{
lineHadBreakpoint
=
true
lineHadBreakpoint
=
true
if
(
direction
===
1
)
{
if
(
direction
===
1
)
{
if
(
hitLine
(
currentStep
,
sourceLocation
,
this
))
{
if
(
hitLine
(
currentStep
,
sourceLocation
,
previousSourceLocation
,
this
))
{
return
return
}
}
}
}
...
...
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