<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Dec 21, 2017 at 2:29 PM, Max Lapshin <span dir="ltr"><<a href="mailto:max.lapshin@gmail.com" target="_blank">max.lapshin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra">so a very dirty bad nif that will inspect arbitrary memory space will help here?</div></div>
</blockquote></div><br></div><div class="gmail_extra">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.</div><div class="gmail_extra"><br></div><div class="gmail_extra">However that makes it very easy to by mistake keep all the binaries live forever because they are referenced in the shell history :/</div><div class="gmail_extra"><br></div><div class="gmail_extra">







<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">Eshell V9.2<span class="gmail-Apple-converted-space">  </span>(abort with ^G)</span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">1> erlang:process_info(whereis(binary_problem), binary).</span></p><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">[ list of permanent binary problems .... ]</span></p></div><div class="gmail_extra"><br></div><div class="gmail_extra">Though with the correct documentation NOTE WARNING DANGER, I can see it being a useful debugging tool.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Lukas</div></div>