Skip to content

Instantly share code, notes, and snippets.

@nessamurmur
Forked from andelf/beam_decompile.erl
Created March 26, 2014 14:06
Show Gist options
  • Save nessamurmur/9783877 to your computer and use it in GitHub Desktop.
Save nessamurmur/9783877 to your computer and use it in GitHub Desktop.
#!/usr/bin/env escript
% -*- mode: erlang -*-
main([BeamFile]) ->
{ok,{_,[{abstract_code,{_,AC}}]}} = beam_lib:chunks(BeamFile,[abstract_code]),
io:fwrite("~s~n", [erl_prettypr:format(erl_syntax:form_list(AC))]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment