Special diff output + debugger changes
This commit is contained in:
parent
c2bca5939d
commit
d3e31a4a6d
@ -116,7 +116,7 @@ ApplicationWindow {
|
||||
id: compileTimer
|
||||
interval: 500 ; running: true ; repeat: true
|
||||
onTriggered: {
|
||||
dbg.compile(codeEditor.text)
|
||||
dbg.autoComp(codeEditor.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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")
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user