darm
darm copied to clipboard
A light-weight and efficient disassembler written in C for the ARMv7 instruction set.
I've used darm for a while but then eventually stumbled upon incorrectly decoded instruction, and after searching through github issues I found out that project is not really maintained and...
``` import darm d = darm.disasm_armv7(0) print d.Rd, d.Rn, d.Rm, d.shift print d ``` ``` r0 r0 r0 Traceback (most recent call last): File "fuck.py", line 5, in print d.Rd,...
Reference http://jbremer.org/darm/
Not sure if this is 100% correct, but I need a fix something like this =)
In the following example type is T_INVLD (also I think "Rn=PC" should be present but it is not): ``` >>> darm.disasm_thumb2(0xf8df8058) Darm(instr=I_LDR, instr_type=T_INVLD, cond=C_AL, Rt=r8, U=True, I=True, rotate=0, imm=88) ```...
Vector instructions are currently unsupported but they are used, particularly in standard libraries. One good place to start would be A32 encodings, prioritizing `vpush, vpop, vldr, vstr, vmov`. The bigger...
thumb16/thumb32
Posting based on issue reported by Radu Serban over email. E16FF000 - MSR SPSF_cxsf, R0 E12FF002 - MSR CPRS_cxsf, R2 E8FDDFFF - LDMFD SP!, {R0-R12, LR-PC}^ - and equivalents with...
``` >>> darm.disasm_thumb2(0xf8519003).__str__() 'ldr r9, [r1], r3, lsl #0' >>> darm.disasm_thumb2(0xf8519003) Darm(instr=I_LDR, instr_type=T_INVLD, cond=C_AL, Rn=r1, Rm=r3, Rt=r9, I=True, rotate=0, Shift(type_=S_LSL, shift=0)) ``` objdump: `f851 9003 ldr.w r9, [r1, r3]` 1)...