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
82a2e4fe
Commit
82a2e4fe
authored
Oct 18, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reflect changes to the eth/vm
parent
6956b510
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
flags.go
ethereum/flags.go
+2
-2
debugger.go
mist/debugger.go
+8
-8
flags.go
mist/flags.go
+2
-2
No files found.
ethereum/flags.go
View file @
82a2e4fe
...
...
@@ -9,7 +9,7 @@ import (
"path"
"github.com/ethereum/eth-go/ethlog"
"github.com/ethereum/eth-go/
eth
vm"
"github.com/ethereum/eth-go/vm"
)
var
(
...
...
@@ -95,7 +95,7 @@ func Init() {
flag
.
Parse
()
if
VmType
>=
int
(
eth
vm
.
MaxVmTy
)
{
if
VmType
>=
int
(
vm
.
MaxVmTy
)
{
log
.
Fatal
(
"Invalid VM type "
,
VmType
)
}
...
...
mist/debugger.go
View file @
82a2e4fe
...
...
@@ -10,7 +10,7 @@ import (
"github.com/ethereum/eth-go/ethchain"
"github.com/ethereum/eth-go/ethstate"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/eth-go/
eth
vm"
"github.com/ethereum/eth-go/vm"
"github.com/ethereum/go-ethereum/utils"
"gopkg.in/qml.v1"
)
...
...
@@ -20,7 +20,7 @@ type DebuggerWindow struct {
engine
*
qml
.
Engine
lib
*
UiLib
vm
*
eth
vm
.
DebugVm
vm
*
vm
.
DebugVm
Db
*
Debugger
state
*
ethstate
.
State
...
...
@@ -37,7 +37,7 @@ func NewDebuggerWindow(lib *UiLib) *DebuggerWindow {
win
:=
component
.
CreateWindow
(
nil
)
w
:=
&
DebuggerWindow
{
engine
:
engine
,
win
:
win
,
lib
:
lib
,
vm
:
&
eth
vm
.
DebugVm
{}}
w
:=
&
DebuggerWindow
{
engine
:
engine
,
win
:
win
,
lib
:
lib
,
vm
:
&
vm
.
DebugVm
{}}
w
.
Db
=
NewDebugger
(
w
)
return
w
...
...
@@ -133,9 +133,9 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
block
:=
self
.
lib
.
eth
.
BlockChain
()
.
CurrentBlock
callerClosure
:=
eth
vm
.
NewClosure
(
&
ethstate
.
Message
{},
account
,
contract
,
script
,
gas
,
gasPrice
)
callerClosure
:=
vm
.
NewClosure
(
&
ethstate
.
Message
{},
account
,
contract
,
script
,
gas
,
gasPrice
)
env
:=
utils
.
NewEnv
(
state
,
block
,
account
.
Address
(),
value
)
vm
:=
eth
vm
.
NewDebugVm
(
env
)
vm
:=
vm
.
NewDebugVm
(
env
)
vm
.
Dbg
=
self
.
Db
self
.
vm
=
vm
...
...
@@ -250,13 +250,13 @@ type storeVal struct {
Key
,
Value
string
}
func
(
self
*
Debugger
)
BreakHook
(
pc
int
,
op
ethvm
.
OpCode
,
mem
*
ethvm
.
Memory
,
stack
*
eth
vm
.
Stack
,
stateObject
*
ethstate
.
StateObject
)
bool
{
func
(
self
*
Debugger
)
BreakHook
(
pc
int
,
op
vm
.
OpCode
,
mem
*
vm
.
Memory
,
stack
*
vm
.
Stack
,
stateObject
*
ethstate
.
StateObject
)
bool
{
self
.
main
.
Logln
(
"break on instr:"
,
pc
)
return
self
.
halting
(
pc
,
op
,
mem
,
stack
,
stateObject
)
}
func
(
self
*
Debugger
)
StepHook
(
pc
int
,
op
ethvm
.
OpCode
,
mem
*
ethvm
.
Memory
,
stack
*
eth
vm
.
Stack
,
stateObject
*
ethstate
.
StateObject
)
bool
{
func
(
self
*
Debugger
)
StepHook
(
pc
int
,
op
vm
.
OpCode
,
mem
*
vm
.
Memory
,
stack
*
vm
.
Stack
,
stateObject
*
ethstate
.
StateObject
)
bool
{
return
self
.
halting
(
pc
,
op
,
mem
,
stack
,
stateObject
)
}
...
...
@@ -268,7 +268,7 @@ func (self *Debugger) BreakPoints() []int64 {
return
self
.
breakPoints
}
func
(
d
*
Debugger
)
halting
(
pc
int
,
op
ethvm
.
OpCode
,
mem
*
ethvm
.
Memory
,
stack
*
eth
vm
.
Stack
,
stateObject
*
ethstate
.
StateObject
)
bool
{
func
(
d
*
Debugger
)
halting
(
pc
int
,
op
vm
.
OpCode
,
mem
*
vm
.
Memory
,
stack
*
vm
.
Stack
,
stateObject
*
ethstate
.
StateObject
)
bool
{
d
.
win
.
Root
()
.
Call
(
"setInstruction"
,
pc
)
d
.
win
.
Root
()
.
Call
(
"clearMem"
)
d
.
win
.
Root
()
.
Call
(
"clearStack"
)
...
...
mist/flags.go
View file @
82a2e4fe
...
...
@@ -12,7 +12,7 @@ import (
"bitbucket.org/kardianos/osext"
"github.com/ethereum/eth-go/ethlog"
"github.com/ethereum/eth-go/
eth
vm"
"github.com/ethereum/eth-go/vm"
)
var
(
...
...
@@ -106,7 +106,7 @@ func Init() {
flag
.
Parse
()
if
VmType
>=
int
(
eth
vm
.
MaxVmTy
)
{
if
VmType
>=
int
(
vm
.
MaxVmTy
)
{
log
.
Fatal
(
"Invalid VM type "
,
VmType
)
}
}
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