gimli-rs/ddbug

Display annotated disassembly

philipc opened this issue · 3 comments

Display the disassembled instructions for each function, and annotate with information from the DWARF. Desired information:

  • variables associated with operands of instructions
  • file/line, and inlined function if applicable

Optimization is going to make this hard to display in a sensible manner, but I'm hopeful at least some useful information is possible.

This probably requires HTML output to be usable (see #4).

luser commented

Feel free to crib code from (or massage the code into a reusable crate) my rust-disasm work:
https://github.com/luser/rust-disasm/blob/7097f13828207a13f6f72a50a61e467a817f0ddf/src/lib.rs#L79

Thanks, but I'm already doing disassembly in this crate using panopticon (I use it to find function calls). I need to stick with using panopticon for disassembly; capstone's semantic info is lacking.

I've switched to capstone. Still not convinced its semantic info is complete enough, but it handles what I need so far, and it is more reliable.

ddbug can now output basic disassembly with CFI directives.