I'm wondering if there's a package for emacs that would allow me to see the generated assembly code quickly of a function? This should also work with compiler optimizations enabled. What I'd like is to be able to with one command open a new buffer which would contain the assembly code of the current function.
Xcode on OS X does this very nicely, but I'd like to switch back to Linux and emacs on my dev workstation and this is a feature I've learned to like a lot.
Try disaster.el
:
Disaster lets you press
C-c d
to see the compiled assembly code for the C/C++ file you're currently editing. It even jumps to and highlights the line of assembly corresponding to the line beneath your cursor.It works by creating a
.o
file using make (if you have a Makefile) or the default system compiler. It then runs that file through objdump to generate the human-readable assembly.
disaster.el
is available in MELPA.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With