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
d3e31a4a
Commit
d3e31a4a
authored
Jul 11, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Special diff output + debugger changes
parent
c2bca593
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
3 deletions
+22
-3
debugger.qml
ethereal/assets/debugger/debugger.qml
+1
-1
debugger.go
ethereal/debugger.go
+11
-2
flags.go
ethereum/flags.go
+2
-0
main.go
ethereum/main.go
+8
-0
No files found.
ethereal/assets/debugger/debugger.qml
View file @
d3e31a4a
...
@@ -116,7 +116,7 @@ ApplicationWindow {
...
@@ -116,7 +116,7 @@ ApplicationWindow {
id
:
compileTimer
id
:
compileTimer
interval
:
500
;
running
:
true
;
repeat
:
true
interval
:
500
;
running
:
true
;
repeat
:
true
onTriggered
:
{
onTriggered
:
{
dbg
.
compile
(
codeEditor
.
text
)
dbg
.
autoComp
(
codeEditor
.
text
)
}
}
}
}
}
}
...
...
ethereal/debugger.go
View file @
d3e31a4a
...
@@ -74,6 +74,13 @@ func (self *DebuggerWindow) Compile(code string) {
...
@@ -74,6 +74,13 @@ func (self *DebuggerWindow) Compile(code string) {
}
}
}
}
// Used by QML
func
(
self
*
DebuggerWindow
)
AutoComp
(
code
string
)
{
if
self
.
Db
.
done
{
self
.
Compile
(
code
)
}
}
func
(
self
*
DebuggerWindow
)
ClearLog
()
{
func
(
self
*
DebuggerWindow
)
ClearLog
()
{
self
.
win
.
Root
()
.
Call
(
"clearLog"
)
self
.
win
.
Root
()
.
Call
(
"clearLog"
)
}
}
...
@@ -110,8 +117,6 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
...
@@ -110,8 +117,6 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
return
return
}
}
self
.
SetAsm
(
script
)
var
(
var
(
gas
=
ethutil
.
Big
(
gasStr
)
gas
=
ethutil
.
Big
(
gasStr
)
gasPrice
=
ethutil
.
Big
(
gasPriceStr
)
gasPrice
=
ethutil
.
Big
(
gasPriceStr
)
...
@@ -257,6 +262,10 @@ func (self *Debugger) StepHook(pc int, op ethchain.OpCode, mem *ethchain.Memory,
...
@@ -257,6 +262,10 @@ func (self *Debugger) StepHook(pc int, op ethchain.OpCode, mem *ethchain.Memory,
return
self
.
halting
(
pc
,
op
,
mem
,
stack
,
stateObject
)
return
self
.
halting
(
pc
,
op
,
mem
,
stack
,
stateObject
)
}
}
func
(
self
*
Debugger
)
SetCode
(
byteCode
[]
byte
)
{
self
.
main
.
SetAsm
(
byteCode
)
}
func
(
self
*
Debugger
)
BreakPoints
()
[]
int64
{
func
(
self
*
Debugger
)
BreakPoints
()
[]
int64
{
return
self
.
breakPoints
return
self
.
breakPoints
}
}
...
...
ethereum/flags.go
View file @
d3e31a4a
...
@@ -11,6 +11,7 @@ import (
...
@@ -11,6 +11,7 @@ import (
var
Identifier
string
var
Identifier
string
var
KeyRing
string
var
KeyRing
string
var
DiffTool
bool
var
KeyStore
string
var
KeyStore
string
var
StartRpc
bool
var
StartRpc
bool
var
RpcPort
int
var
RpcPort
int
...
@@ -66,6 +67,7 @@ func Init() {
...
@@ -66,6 +67,7 @@ func Init() {
flag
.
StringVar
(
&
ConfigFile
,
"conf"
,
defaultConfigFile
,
"config file"
)
flag
.
StringVar
(
&
ConfigFile
,
"conf"
,
defaultConfigFile
,
"config file"
)
flag
.
StringVar
(
&
DebugFile
,
"debug"
,
""
,
"debug file (no debugging if not set)"
)
flag
.
StringVar
(
&
DebugFile
,
"debug"
,
""
,
"debug file (no debugging if not set)"
)
flag
.
IntVar
(
&
LogLevel
,
"loglevel"
,
int
(
ethlog
.
InfoLevel
),
"loglevel: 0-5: silent,error,warn,info,debug,debug detail)"
)
flag
.
IntVar
(
&
LogLevel
,
"loglevel"
,
int
(
ethlog
.
InfoLevel
),
"loglevel: 0-5: silent,error,warn,info,debug,debug detail)"
)
flag
.
BoolVar
(
&
DiffTool
,
"difftool"
,
false
,
"creates output for diff'ing. Sets LogLevel=0"
)
flag
.
BoolVar
(
&
StartMining
,
"mine"
,
false
,
"start dagger mining"
)
flag
.
BoolVar
(
&
StartMining
,
"mine"
,
false
,
"start dagger mining"
)
flag
.
BoolVar
(
&
StartJsConsole
,
"js"
,
false
,
"launches javascript console"
)
flag
.
BoolVar
(
&
StartJsConsole
,
"js"
,
false
,
"launches javascript console"
)
...
...
ethereum/main.go
View file @
d3e31a4a
...
@@ -2,6 +2,7 @@ package main
...
@@ -2,6 +2,7 @@ package main
import
(
import
(
"github.com/ethereum/eth-go/ethlog"
"github.com/ethereum/eth-go/ethlog"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/go-ethereum/utils"
"github.com/ethereum/go-ethereum/utils"
"runtime"
"runtime"
)
)
...
@@ -20,7 +21,14 @@ func main() {
...
@@ -20,7 +21,14 @@ func main() {
// precedence: code-internal flag default < config file < environment variables < command line
// precedence: code-internal flag default < config file < environment variables < command line
Init
()
// parsing command line
Init
()
// parsing command line
// If the difftool option is selected ignore all other log output
if
DiffTool
{
LogLevel
=
0
}
utils
.
InitConfig
(
ConfigFile
,
Datadir
,
"ETH"
)
utils
.
InitConfig
(
ConfigFile
,
Datadir
,
"ETH"
)
ethutil
.
Config
.
Diff
=
DiffTool
utils
.
InitDataDir
(
Datadir
)
utils
.
InitDataDir
(
Datadir
)
...
...
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