jart/disaster is an open-source project on GitHub with 347 stars, written primarily in Emacs Lisp. Disassemble C/C++ code under cursor in Emacs
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Disaster lets you press C-c d to see the compiled assembly code for the
C, C++ or Fortran file you're currently editing. It even jumps to and
highlights the line of assembly corresponding to the line beneath your cursor.
It works in the following manner:
If there is a Makefile, creating a .o file using make
If there is a compile_commands.json file, use it to get the compilation
command for the file.
If none of the above files is presnet, use the default system compiler.
After compiling the source to a .o file, disaster runs that file through
objdump to generate the human-readable assembly.
Installation
Make sure to place disaster.el somewhere in the load-path, then you should
be able to run M-x disaster. If you want, you add the following lines to
your .emacs file to register the C-c d shortcut for invoking disaster:
Create compile command for a Make-based project.
MAKE-ROOT: path to build root,
CWD: path to current source file,
REL-OBJ: path to object file (relative to project root),
OBJ-FILE: full path to object file (build root!)
PROJ-ROOT: path to project root, REL-FILE FILE.
Create compile command from a "compile_commands.json" file.
MAKE-ROOT: path to build root,
CWD: path to current source file,
REL-OBJ: path to object file (relative to project root),
OBJ-FILE: full path to object file (build root!)
PROJ-ROOT: path to project root, REL-FILE FILE.
USE-COMPILE-DB: non NIL to use the compiler found in compile_commands.json,
generated by CMake or Bear for example, NIL to use Make or default compiler
options,
MAKE-ROOT: path to build root,
CWD: path to current source file,
REL-OBJ: path to object file (relative to project root),
OBJ-FILE: full path to object file (build root!)
PROJ-ROOT: path to project root, REL-FILE FILE.
(disaster &optional FILE LINE)
Show assembly code for current line of C/C++ file.
Here's the logic path it follows:
Is there a complile_commands.json in this directory? Get the object file
name for the current file, and run it associated command.
Is there a Makefile in this directory? Run make bufname.o.
Or is there a Makefile in a parent directory? Run make -C .. bufname.o.
Or is this a C file? Run cc -g -c -o bufname.o bufname.c
Or is this a C++ file? Run c++ -g -c -o bufname.o bufname.c
If build failed, display errors in compile-mode.
Run objdump inside a new window while maintaining focus.
Jump to line matching current line.
If FILE and LINE are not specified, the current editing location
is used.
(disaster-find-project-root &optional LOOKS FILE)
General-purpose Heuristic to detect bottom directory of project.
First, this will try to use (vc-root-dir) to guess the project
root directory, and falls back to manual check wich works by scanning
parent directories of FILE (using disaster--find-parent-dirs) for certain
types of files like a .projectile file or a Makefile (which is less
preferred).
The canonical structure of LOOKS is a list of lists of files
to look for in each parent directory where sublists are ordered
from highest precedence to lowest. However you may specify
LOOKS as a single string or a list of strings for your
convenience. If LOOKS is not specified, it'll default to
disaster-project-root-files.
No homepage URL was recorded for jart/disaster in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
Does jart/disaster have any tags?
TopGit's last sync did not record any GitHub topics for jart/disaster. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on jart/disaster?
The most recent commit recorded on jart/disaster was 11 months ago, based on the GitHub push timestamp. The repository has 33 forks — one of the better signals of community interest.
Is jart/disaster open source?
TopGit's metadata for jart/disaster does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
Where do I read more about jart/disaster?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/jart/disaster is the definitive source.
Read full README in the tab above.
Curious whether disaster is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about disaster.