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 {
id
:
compileTimer
interval
:
500
;
running
:
true
;
repeat
:
true
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) {
}
}
// Used by QML
func
(
self
*
DebuggerWindow
)
AutoComp
(
code
string
)
{
if
self
.
Db
.
done
{
self
.
Compile
(
code
)
}
}
func
(
self
*
DebuggerWindow
)
ClearLog
()
{
self
.
win
.
Root
()
.
Call
(
"clearLog"
)
}
...
...
@@ -110,8 +117,6 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
return
}
self
.
SetAsm
(
script
)
var
(
gas
=
ethutil
.
Big
(
gasStr
)
gasPrice
=
ethutil
.
Big
(
gasPriceStr
)
...
...
@@ -257,6 +262,10 @@ func (self *Debugger) StepHook(pc int, op ethchain.OpCode, mem *ethchain.Memory,
return
self
.
halting
(
pc
,
op
,
mem
,
stack
,
stateObject
)
}
func
(
self
*
Debugger
)
SetCode
(
byteCode
[]
byte
)
{
self
.
main
.
SetAsm
(
byteCode
)
}
func
(
self
*
Debugger
)
BreakPoints
()
[]
int64
{
return
self
.
breakPoints
}
...
...
ethereum/flags.go
View file @
d3e31a4a
...
...
@@ -11,6 +11,7 @@ import (
var
Identifier
string
var
KeyRing
string
var
DiffTool
bool
var
KeyStore
string
var
StartRpc
bool
var
RpcPort
int
...
...
@@ -66,6 +67,7 @@ func Init() {
flag
.
StringVar
(
&
ConfigFile
,
"conf"
,
defaultConfigFile
,
"config file"
)
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
.
BoolVar
(
&
DiffTool
,
"difftool"
,
false
,
"creates output for diff'ing. Sets LogLevel=0"
)
flag
.
BoolVar
(
&
StartMining
,
"mine"
,
false
,
"start dagger mining"
)
flag
.
BoolVar
(
&
StartJsConsole
,
"js"
,
false
,
"launches javascript console"
)
...
...
ethereum/main.go
View file @
d3e31a4a
...
...
@@ -2,6 +2,7 @@ package main
import
(
"github.com/ethereum/eth-go/ethlog"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/go-ethereum/utils"
"runtime"
)
...
...
@@ -20,7 +21,14 @@ func main() {
// precedence: code-internal flag default < config file < environment variables < 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"
)
ethutil
.
Config
.
Diff
=
DiffTool
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