das-labor / panopticon

A libre cross-platform disassembler.
https://panopticon.re
GNU General Public License v3.0
1.43k stars 78 forks source link

CLI bug fixes, improvements, and color #315

Closed m4b closed 7 years ago

m4b commented 7 years ago

WIP

  1. Adds color :heart_eyes_cat: to asm in CLI screenshot from 2017-07-30 13-58-45

  2. Moves the CLI display logic to CLI module

  3. Fixes longstanding bug incorrectly resolving call to internal, resolved functions, and now correctly displays name, e.g.: screenshot from 2017-07-30 14-04-11

  4. Correctly resolves multiple function aliases, e.g., printf, _IO_printf in libc

  5. Adds a new 2x faster pipeline which updates the program object automatically, and uses rayon for parallelism when no UI thread will be present (so CLI uses it)

  6. Adds a function iterator to program for ergonomics

  7. some touchup and love to the program object

  8. Add region() method to project, so clients don't need to import graph-algos to use project

m4b commented 7 years ago

NOTE: we should switch eventually to either term or termcolor to be more friendly (e.g., not print garbage) to window machines, as well as when piping to a file

flanfly commented 7 years ago

Wow, fancy! 😍

(e.g., not print garbage) to window machines, as well as when piping to a file

We can always fix things Later™️

m4b commented 7 years ago

It's not like people use windows that much anyway ;)

I actually already find syntax highlighting for asm output indispensable. Helped find and fix call function bug, as well as highlighting the semantic differences, e.g. je in x86 as well as how leaq is treated

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.1%) to 59.812% when pulling faec0ef0efb9b9bb3910816ca710f2363e98e346 on m4b/cli_color into c738b31b396e1b04e7f18e33b2997546dbf18325 on master.

flanfly commented 7 years ago

👍 Amazing work as usual

sphinxc0re commented 7 years ago

@m4b does the highlighting work under Windows as well?

m4b commented 7 years ago

No :/ need to add term or termcolor crate for better cross platform printing. shouldn't be too hard