pfalcon / ScratchABit

Easily retargetable and hackable interactive disassembler with IDAPython-compatible plugin API
GNU General Public License v3.0
393 stars 47 forks source link

plugins/cpu/arm_thumb: Condition codes in b.w don't appear to be decoded #23

Closed pfalcon closed 7 years ago

pfalcon commented 7 years ago

Example of disasm:

│08020036          nlr_jump:                                                                                                           │
│08020036 0d4b         ldr      r3, [pc, #52]                                                                                          │
│08020038 1a68         ldr      r2, [r3, #0]                                                                                           │
│0802003a 002a         cmp      r2, #0                                                                                                 │
│0802003c 0df0de83     b.w      nlr_jump_fail                                                                                          │
│08020040 50           unk     0x50 ; 'P'                                                                                              │
│08020041 60           unk     0x60 ; '`'                                                                                              │
│08020042 10           unk     0x10                                                                                                    │
│08020043 68           unk     0x68 ; 'h'                                                                                              │
│08020044 18           unk     0x18                                                                                                    │
│08020045 60           unk     0x60 ; '`'                                                 

That b.w can't be right, should be conditional.

(Disassembling MicroPython's bare-arm port.)

pfalcon commented 7 years ago

@dpgeorge, @flowergrass : FYI

pfalcon commented 7 years ago

Another issue:

objdump:

 8020504:       f7ff bde6       b.w     80200d4 <m_free>

vs

08020504 fff7e6bd     b.w      0xa0200d4       
pfalcon commented 7 years ago

Tracked in #24.