Comments (4)
Yeah I'm having the same behavior too. http://blog.curvegrid.com/daysofblock/2017/05/11/daysofblock-01-evmdis.html makes it look like you are in fact supposed to pass the input through stdin, but my results match up with you rather than that blog post.
from evmdis.
@nolash, you need to pipe the hex into evmdis
, it won't take a file as a parameter. So your cat <binfile> | evmdis -log
is the right idea. I suspect what's happening with the short output is your <binfile>
has a newline on the end, which causes that output.
Compare the following. evmdis-issue-6-orig-crlf.hex
has a newline on the end and evmdis-issue-6-orig.hex
doesn't, otherwise they are identical. I copied the compiled Solidity hex code you pasted verbatim:
$ cat evmdis-issue-6-orig-crlf.hex | evmdis -log
2017/09/12 21:08:10 Entering block at 0 with stack height 0
# Stack: []
0x0 STOP()
$ cat evmdis-issue-6-orig.hex | evmdis -log
2017/09/12 21:06:51 Entering block at 0 with stack height 0
2017/09/12 21:06:51 Entering block at 55 with stack height 1
2017/09/12 21:06:51 Entering block at 66 with stack height 1
2017/09/12 21:06:51 Entering block at 105 with stack height 1
2017/09/12 21:06:51 Entering block at 110 with stack height 1
2017/09/12 21:06:51 Entering block at 115 with stack height 1
2017/09/12 21:06:51 Entering block at 132 with stack height 3
2017/09/12 21:06:51 Entering block at 138 with stack height 3
2017/09/12 21:06:51 Entering block at 124 with stack height 1
2017/09/12 21:06:51 Entering block at 71 with stack height 1
2017/09/12 21:06:51 Entering block at 76 with stack height 1
2017/09/12 21:06:51 Entering block at 81 with stack height 1
2017/09/12 21:06:51 Entering block at 126 with stack height 2
2017/09/12 21:06:51 Entering block at 87 with stack height 3
# Stack: []
0x4 MSTORE(0x40, 0x60)
0x2C PUSH(CALLDATALOAD(0x0) / 0x100000000000000000000000000000000000000000000000000000000 & 0xFFFFFFFF)
0x32 DUP1
0x36 JUMPI(:label0, POP() == 0x7C2EFCBA)
# Stack: [@0x2C]
0x37 DUP1
0x40 JUMPI(:label3, 0xDB80813F == POP())
# Stack: [@0x2C]
0x42 PUSH(0x0)
<snip>
Hope that helps!
And obviously a future enhancement opportunity to improve the help text (evmdis -h
), README and overall handling of newlines.
from evmdis.
@agentme could you check my previous comment and see if that helps?
from evmdis.
Yep, it was the newline at the end! Works great when I cut that out, thanks!
from evmdis.
Related Issues (14)
- Program crashes while reaching "reaching.go:80 Advance()" -> invalid memory address HOT 4
- Am I use evmdis only when I compile a contract ? HOT 1
- A newcomer need a detailed example HOT 3
- Add usage instructions to README and help. HOT 2
- Doesn't appear to work for Serpent sourced bytecode.
- Issue with the SWAP1 instruction when both operands are lifted
- Disassembler loops forever with this bytecode HOT 1
- Illegal instruction HOT 7
- Is evmdis still under development? HOT 2
- Can't install EVMDIS on Ubuntu 20.04 virtual machine HOT 1
- Represent unreachable bytecode as 'data' blocks
- Missing license HOT 1
- Non-static jump error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evmdis.