[erlang-questions] Inspecting a process's binaries
Lukas Larsson
lukas@REDACTED
Fri Dec 22 14:36:30 CET 2017
On Thu, Dec 21, 2017 at 2:29 PM, Max Lapshin <max.lapshin@REDACTED> wrote:
> so a very dirty bad nif that will inspect arbitrary memory space will help
> here?
>
Yes indeed a nif could do that. It would be possible to change
process_info(pid, binary) call to return the payload of the binary that is
referenced.
However that makes it very easy to by mistake keep all the binaries live
forever because they are referenced in the shell history :/
Eshell V9.2 (abort with ^G)
1> erlang:process_info(whereis(binary_problem), binary).
[ list of permanent binary problems .... ]
Though with the correct documentation NOTE WARNING DANGER, I can see it
being a useful debugging tool.
Lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171222/99e6fcd3/attachment.htm>
More information about the erlang-questions
mailing list