I have Erlang application's beam files which I want to decompile.
Application is Compiled and build with 'debug_info' options. here is snippet of emake file to which is used to build application :
{"apps/my_app/src/*", [debug_info, nowarn_export_all, {outdir, "apps/my_app/ebin"},{pa, "deps"},{parse_transform, lager_transform}, {parse_transform, events_transform}]}.
I have tried function from beam_lib module but getting following Error :
1>{ok,{_,[{abstract_code,{_,AC}}]}} = beam_lib:chunks(abc,[abstract_code]).
** exception error: no match of right hand side value {error,beam_lib,{not_a_beam_file,'abc.beam'}}
I have also tried solution mentioned in following post Decompile erlang .beam files compiled without debug_info but Its not working for me. I'm getting following error :
1> file:write_file("/tmp/my_module_disasm", io_lib:fwrite("~p.\n", [beam_disasm:file(abc)])).
ok
/tmp/my_module_disasm file contains :
{error,beam_lib,{not_a_beam_file,'abc.beam'}}.
Anyone have Idea ?