-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Capstone's instruction classification is weak for ARM #1072
Comments
Another problem: |
+1 For PowerPC, it's even much worse! It looks like there was just a single semantic group in this arch: The lack of the proper instruction classification in Capstone makes this otherwise great library unsuitable for semi-automatic static program analysis. Tools like recursive disassemblers or decompilers usually operate on basic blocks. In order to be able to analyze the control flow of a program, it's not enough to know whether an instruction is a branch or not; it could be an unconditional branch (one-way control flow), a conditional branch (two-way control flow), a call, a return or even an indirect branch. The problem is that such a functionality has to be added or worked around in every project that requires it, worse yet, in a non-portable manner. I did it earlier and I know that some other people do it, too. I therefore propose
I'd assist on PowerPC and 68k. But the desired API consistency need to be provided by library maintainer(s). |
ldm
akapop
instruction for ARM affectingpc
register should be classified as CS_GRP_RET, because, well, it's a control transfer instruction, usually used to implement (optimize) return from a subroutine.Without cases like that, Capstone's instruction classification isn't much useful, and needs to be worked around in adhoc way on app's side. For example, for a recursive traversal disassembler, properly classified instruction are of utmost importance. If return insns are misclassified, a disassembler may disassemble what is not instructions.
The text was updated successfully, but these errors were encountered: