plasma-disassembler / plasma

Plasma is an interactive disassembler for x86/ARM/MIPS. It can generates indented pseudo-code with colored syntax.
GNU General Public License v3.0
3.05k stars 277 forks source link

Regression for visual mode #46

Closed daniel-k closed 8 years ago

daniel-k commented 8 years ago

I just played around with reverse a little bit, pulled again and visual mode stopped working. For me, the regression is introduced by 77a577241e5b88b3749b7b19845983abcd28449d.

Cool project! :)

daniel:reverse/ (detached*)$ git co 77a577241e5b88b3749b7b19845983abcd28449d
Vorherige Position von HEAD war df2144e... set address line after printing the label
HEAD ist jetzt bei 77a5772... add xrefs (command xrefs in the console and x in visual)
daniel:reverse/ (detached*)$ ./reverse.py -i tests/server.bin 
>> v
Traceback (most recent call last):
  File "./reverse.py", line 37, in <module>
    i = Console(ctx)
  File "/home/daniel/apps/reverse/lib/ui/console.py", line 414, in __init__
    rl.loop()
  File "/home/daniel/apps/reverse/lib/ui/readline.py", line 123, in loop
    self.process_key(ch)
  File "/home/daniel/apps/reverse/lib/ui/readline.py", line 133, in process_key
    self.mapping[ch]()
  File "/home/daniel/apps/reverse/lib/ui/readline.py", line 325, in k_enter
    self.callback_enter(self.line)
  File "/home/daniel/apps/reverse/lib/ui/console.py", line 565, in exec_command
    c.callback_exec(args)
  File "/home/daniel/apps/reverse/lib/ui/console.py", line 781, in __exec_v
    o = self.ctx.dis.dump_asm(self.ctx, NB_LINES_TO_DISASM)
  File "/home/daniel/apps/reverse/lib/disassembler.py", line 314, in dump_asm
    o._asm_inst(i)
  File "/home/daniel/apps/reverse/lib/output.py", line 535, in _asm_inst
    modified = self._sub_asm_inst(i, tab, prefix)
  File "/home/daniel/apps/reverse/lib/arch/x86/output.py", line 337, in _sub_asm_inst
    self._operand(i, 1)
  File "/home/daniel/apps/reverse/lib/arch/x86/output.py", line 84, in _operand
    force_dont_print_data=force_dont_print_data)
  File "/home/daniel/apps/reverse/lib/output.py", line 380, in _imm
    self._unk(imm)
  File "/home/daniel/apps/reverse/lib/output.py", line 175, in _unk
    self.token_lines[-1].append((s, COLOR_UNK.val, COLOR_UNK.bold))
NameError: name 'COLOR_UNK' is not defined
ghost commented 8 years ago

Thanks ! Can you confirm it's ok for you ?

daniel-k commented 8 years ago

Thanks ! Can you confirm it's ok for you ?

Yep, works like a charm :+1: