aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-11 22:04:27 +0800
committerobscuren <geffobscura@gmail.com>2014-07-11 22:04:27 +0800
commitd3e31a4a6db6166b0639f0e9be5f70d5035baeeb (patch)
tree5e89ad593b3b6d87d2116aaf298977ee7b8361ef /ethereal
parentc2bca5939d1d78d1548fcd43c29390fb06a508c0 (diff)
downloaddexon-d3e31a4a6db6166b0639f0e9be5f70d5035baeeb.tar.gz
dexon-d3e31a4a6db6166b0639f0e9be5f70d5035baeeb.tar.zst
dexon-d3e31a4a6db6166b0639f0e9be5f70d5035baeeb.zip
Special diff output + debugger changes
Diffstat (limited to 'ethereal')
-rw-r--r--ethereal/assets/debugger/debugger.qml2
-rw-r--r--ethereal/debugger.go13
2 files changed, 12 insertions, 3 deletions
diff --git a/ethereal/assets/debugger/debugger.qml b/ethereal/assets/debugger/debugger.qml
index f204647c8..4d01ea183 100644
--- a/ethereal/assets/debugger/debugger.qml
+++ b/ethereal/assets/debugger/debugger.qml
@@ -116,7 +116,7 @@ ApplicationWindow {
id: compileTimer
interval: 500 ; running: true ; repeat: true
onTriggered: {
- dbg.compile(codeEditor.text)
+ dbg.autoComp(codeEditor.text)
}
}
}
diff --git a/ethereal/debugger.go b/ethereal/debugger.go
index 64ca316f8..997c2e8dd 100644
--- a/ethereal/debugger.go
+++ b/ethereal/debugger.go
@@ -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
}