aboutsummaryrefslogtreecommitdiffstats
path: root/ethvm/vm_debug.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-10-15 06:40:41 +0800
committerobscuren <geffobscura@gmail.com>2014-10-15 06:40:41 +0800
commit3d177be73e127b08a52988fde308eed29eac4699 (patch)
tree4907a28db7a72af10cd1877d0932e6d71690c075 /ethvm/vm_debug.go
parent7ca7938d8e4a63b4bd244ee46856ec657d63a374 (diff)
downloadgo-tangerine-3d177be73e127b08a52988fde308eed29eac4699.tar.gz
go-tangerine-3d177be73e127b08a52988fde308eed29eac4699.tar.zst
go-tangerine-3d177be73e127b08a52988fde308eed29eac4699.zip
Couple of minor issues fixed
* CALLVALUE pushed incorrect value to the stack * Set execution model to closure
Diffstat (limited to 'ethvm/vm_debug.go')
-rw-r--r--ethvm/vm_debug.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/ethvm/vm_debug.go b/ethvm/vm_debug.go
index 0a1e0155e..df8cbb10c 100644
--- a/ethvm/vm_debug.go
+++ b/ethvm/vm_debug.go
@@ -482,7 +482,7 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) {
self.Printf(" => %x", caller)
case CALLVALUE:
- value := self.env.Value()
+ value := closure.exe.value
stack.Push(value)
@@ -674,7 +674,10 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) {
val, loc := stack.Popn()
closure.SetStorage(loc, ethutil.NewValue(val))
- closure.message.AddStorageChange(loc.Bytes())
+ // Debug sessions are allowed to run without message
+ if closure.message != nil {
+ closure.message.AddStorageChange(loc.Bytes())
+ }
self.Printf(" {0x%x : 0x%x}", loc.Bytes(), val.Bytes())
case JUMP: