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
b3367ec0
Commit
b3367ec0
authored
Jun 26, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added option to not break eachline
parent
1268413b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
15 deletions
+21
-15
debugger.qml
ethereal/assets/debugger/debugger.qml
+6
-0
debugger.go
ethereal/ui/debugger.go
+15
-11
gui.go
ethereal/ui/gui.go
+0
-4
No files found.
ethereal/assets/debugger/debugger.qml
View file @
b3367ec0
...
@@ -208,6 +208,12 @@ ApplicationWindow {
...
@@ -208,6 +208,12 @@ ApplicationWindow {
}
}
text
:
"Next"
text
:
"Next"
}
}
CheckBox
{
id
:
breakEachLine
objectName
:
"breakEachLine"
text
:
"Break each instruction"
checked
:
true
}
}
}
}
}
...
...
ethereal/ui/debugger.go
View file @
b3367ec0
...
@@ -26,7 +26,7 @@ func NewDebuggerWindow(lib *UiLib) *DebuggerWindow {
...
@@ -26,7 +26,7 @@ func NewDebuggerWindow(lib *UiLib) *DebuggerWindow {
}
}
win
:=
component
.
CreateWindow
(
nil
)
win
:=
component
.
CreateWindow
(
nil
)
db
:=
&
Debugger
{
win
,
make
(
chan
bool
),
make
(
chan
bool
),
true
,
false
}
db
:=
&
Debugger
{
win
,
make
(
chan
bool
),
make
(
chan
bool
),
true
,
false
,
true
}
return
&
DebuggerWindow
{
engine
:
engine
,
win
:
win
,
lib
:
lib
,
Db
:
db
}
return
&
DebuggerWindow
{
engine
:
engine
,
win
:
win
,
lib
:
lib
,
Db
:
db
}
}
}
...
@@ -59,6 +59,7 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
...
@@ -59,6 +59,7 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
if
!
self
.
Db
.
done
{
if
!
self
.
Db
.
done
{
self
.
Db
.
Q
<-
true
self
.
Db
.
Q
<-
true
}
}
self
.
Db
.
breakOnInstr
=
self
.
win
.
Root
()
.
ObjectByName
(
"breakEachLine"
)
.
Bool
(
"checked"
)
defer
func
()
{
defer
func
()
{
if
r
:=
recover
();
r
!=
nil
{
if
r
:=
recover
();
r
!=
nil
{
...
@@ -164,6 +165,7 @@ type Debugger struct {
...
@@ -164,6 +165,7 @@ type Debugger struct {
N
chan
bool
N
chan
bool
Q
chan
bool
Q
chan
bool
done
,
interrupt
bool
done
,
interrupt
bool
breakOnInstr
bool
}
}
type
storeVal
struct
{
type
storeVal
struct
{
...
@@ -190,16 +192,18 @@ func (d *Debugger) halting(pc int, op ethchain.OpCode, mem *ethchain.Memory, sta
...
@@ -190,16 +192,18 @@ func (d *Debugger) halting(pc int, op ethchain.OpCode, mem *ethchain.Memory, sta
d
.
win
.
Root
()
.
Call
(
"setStorage"
,
storeVal
{
fmt
.
Sprintf
(
"% x"
,
key
),
fmt
.
Sprintf
(
"% x"
,
node
.
Str
())})
d
.
win
.
Root
()
.
Call
(
"setStorage"
,
storeVal
{
fmt
.
Sprintf
(
"% x"
,
key
),
fmt
.
Sprintf
(
"% x"
,
node
.
Str
())})
})
})
out
:
if
d
.
breakOnInstr
{
for
{
out
:
select
{
for
{
case
<-
d
.
N
:
select
{
break
out
case
<-
d
.
N
:
case
<-
d
.
Q
:
break
out
d
.
interrupt
=
true
case
<-
d
.
Q
:
d
.
clearBuffers
()
d
.
interrupt
=
true
d
.
clearBuffers
()
return
false
return
false
}
}
}
}
}
...
...
ethereal/ui/gui.go
View file @
b3367ec0
...
@@ -154,10 +154,6 @@ func (gui *Gui) createWindow(comp qml.Object) *qml.Window {
...
@@ -154,10 +154,6 @@ func (gui *Gui) createWindow(comp qml.Object) *qml.Window {
gui
.
win
=
win
gui
.
win
=
win
gui
.
uiLib
.
win
=
win
gui
.
uiLib
.
win
=
win
db
:=
&
Debugger
{
gui
.
win
,
make
(
chan
bool
),
make
(
chan
bool
),
true
,
false
}
gui
.
lib
.
Db
=
db
gui
.
uiLib
.
Db
=
db
return
gui
.
win
return
gui
.
win
}
}
func
(
gui
*
Gui
)
setInitialBlockChain
()
{
func
(
gui
*
Gui
)
setInitialBlockChain
()
{
...
...
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