-
Notifications
You must be signed in to change notification settings - Fork 273
new_architecture
joelpx edited this page Mar 5, 2016
·
14 revisions
Work in progress...
Specific files for an architecture are in the folder reverse/lib/arch/<NAME>.
Four files are mandatory to add a new architecture :
-
output.py: this is the implementation of the abstract classreverse.lib.output. -
utils.py: it defines some functions to detect jump/return/call/compare instructions and how instruction symbols must be printed (example add for x86 is "+="). -
process_ast.py: you can define functions to modify the ast after a decompilation. -
__init__.py: it contains the list of all functions defined inprocess_ast.py.
from capstone import CS_MODE_32
from capstone.<ARCH> import ...
from reverse.lib.output import OutputAbs
class Output(OutputAbs):
def _operand(self, i, num_op, hexa=False, show_deref=True,
force_dont_print_data=False):
def _if_cond(self, cond, fused_inst):
def _sub_asm_inst(self, i, tab=0, prefix=""):