-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite x86 decoder to use Capstone for instruction decoding #69
Conversation
Why not to make it work on top of radare2 instead? See radareorg/radare2#10102 |
Only using radare2 as an instruction decoder would ultimately limit flexibility: radare2 would then be a hard dependency. What I eventually want to do is being able to add decoders as plugins, so they can be changed at will. So using radare2 as an instruction decoder might be possible in the future, but as an optional dependency instead of as a hard dependendy. |
I agree with @ceeac, using capstone in a plugin is a better approach. And I'm afraid that integrating radare2 would lead the boomerang to becoming another radare2 frontend ( and there are a few of those already ? :) ) |
Also, two things to consider:
|
ef4d16c
to
ed64863
Compare
Re. |
97bd77d
to
f9d124c
Compare
Capstone is not very updated lately. You can try Zydis. |
There are a couple of things I want to say about this:
|
To clarify what instructions still need semantics for this PR, these are:
In addition, all instructions still have to be checked for correctness before this PR can be merged. |
@ceeac Surely it is abandoned - author cannot support latest ARM instructions for example, PRs are rotting even without response: https://github.com/aquynh/capstone/pulls I am not pushing, just as we (radare2 project) use capstone we met this inability to keep the library updated, thus rendering it is almost useless for any modern real world binaries. |
dd5687b
to
4d9809b
Compare
I have now tested the new decoder on a number of binaries and found it to work and perform much better than the old one. Some finishing touches will still be necessary, but I'll leave that for additional PRs. Re. Zydis support: My current plan is to implement a Zydis decoder plugin after the release of 0.5.0 so users can choose between Capstone and Zydis. |
This PR completely replaces the old PentiumDecoder by a new CapstoneX86Decoder using Capstone for decoding x86 instructions. This has several benefits:
This is a work in progress - do not merge yet.