jbremer / darm

A light-weight and efficient disassembler written in C for the ARMv7 instruction set.
BSD 3-Clause "New" or "Revised" License
213 stars 43 forks source link

T_INVALID type misapplied to instruction #22

Open djpnewton opened 10 years ago

djpnewton commented 10 years ago

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)

some context for the instruction from objdump:

0001e524 <fwrite>:
   1e524:   e92d 43f0   stmdb   sp!, {r4, r5, r6, r7, r8, r9, lr}
   1e528:   461f        mov r7, r3
   1e52a:   fb01 f602   mul.w   r6, r1, r2
   1e52e:   f8df 8058   ldr.w   r8, [pc, #88]   ; 1e588 <fwrite+0x64>
djpnewton commented 10 years ago

Ok looking through the code all thumb2 instructions are set to T_INVALID...

jbremer commented 10 years ago

Hi. Yes, the T_ values were never really to be used externally. A lot of them were mostly for internal handling and didn't actually represent the instruction in any way.

I'm about to release a complete rewrite of darm which is much better in various ways ;) so if you can stay tuned for a bit longer.. :)