Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
ba3623d0
Commit
ba3623d0
authored
Jun 09, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed debugger hang
parent
cc20b0e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
9 deletions
+33
-9
debugger.qml
ethereal/assets/debugger/debugger.qml
+1
-1
debugger.go
ethereal/ui/debugger.go
+31
-7
gui.go
ethereal/ui/gui.go
+1
-1
No files found.
ethereal/assets/debugger/debugger.qml
View file @
ba3623d0
...
...
@@ -163,7 +163,7 @@ ApplicationWindow {
height
:
parent
.
height
width
:
parent
.
width
TableViewColumn
{
id
:
key
;
role
:
"key"
;
title
:
"#"
;
width
:
storageTableView
.
width
/
2
}
TableViewColumn
{
role
:
"value"
;
title
:
"
valu
e"
;
width
:
storageTableView
.
width
/
2
}
TableViewColumn
{
role
:
"value"
;
title
:
"
Storag
e"
;
width
:
storageTableView
.
width
/
2
}
model
:
storageModel
}
}
...
...
ethereal/ui/debugger.go
View file @
ba3623d0
...
...
@@ -26,7 +26,7 @@ func NewDebuggerWindow(lib *UiLib) *DebuggerWindow {
}
win
:=
component
.
CreateWindow
(
nil
)
db
:=
&
Debugger
{
win
,
make
(
chan
bool
),
make
(
chan
bool
),
true
}
db
:=
&
Debugger
{
win
,
make
(
chan
bool
),
make
(
chan
bool
),
true
,
false
}
return
&
DebuggerWindow
{
engine
:
engine
,
win
:
win
,
lib
:
lib
,
Db
:
db
}
}
...
...
@@ -60,6 +60,12 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
self
.
Db
.
Q
<-
true
}
defer
func
()
{
if
r
:=
recover
();
r
!=
nil
{
self
.
Logf
(
"compile FAULT: %v"
,
r
)
}
}()
data
:=
ethutil
.
StringToByteFunc
(
dataStr
,
func
(
s
string
)
(
ret
[]
byte
)
{
slice
:=
strings
.
Split
(
dataStr
,
"
\n
"
)
for
_
,
dataItem
:=
range
slice
{
...
...
@@ -131,7 +137,11 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
state
.
Reset
()
self
.
Db
.
done
=
true
if
!
self
.
Db
.
interrupt
{
self
.
Db
.
done
=
true
}
else
{
self
.
Db
.
interrupt
=
false
}
}()
}
...
...
@@ -149,10 +159,10 @@ func (self *DebuggerWindow) Next() {
}
type
Debugger
struct
{
win
*
qml
.
Window
N
chan
bool
Q
chan
bool
done
bool
win
*
qml
.
Window
N
chan
bool
Q
chan
bool
done
,
interrupt
bool
}
type
storeVal
struct
{
...
...
@@ -185,7 +195,8 @@ out:
case
<-
d
.
N
:
break
out
case
<-
d
.
Q
:
d
.
done
=
true
d
.
interrupt
=
true
d
.
clearBuffers
()
return
false
}
...
...
@@ -194,6 +205,19 @@ out:
return
true
}
func
(
d
*
Debugger
)
clearBuffers
()
{
out
:
// drain
for
{
select
{
case
<-
d
.
N
:
case
<-
d
.
Q
:
default
:
break
out
}
}
}
func
(
d
*
Debugger
)
Next
()
{
if
!
d
.
done
{
d
.
N
<-
true
...
...
ethereal/ui/gui.go
View file @
ba3623d0
...
...
@@ -154,7 +154,7 @@ func (gui *Gui) createWindow(comp qml.Object) *qml.Window {
gui
.
win
=
win
gui
.
uiLib
.
win
=
win
db
:=
&
Debugger
{
gui
.
win
,
make
(
chan
bool
),
make
(
chan
bool
),
true
}
db
:=
&
Debugger
{
gui
.
win
,
make
(
chan
bool
),
make
(
chan
bool
),
true
,
false
}
gui
.
lib
.
Db
=
db
gui
.
uiLib
.
Db
=
db
...
...
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