[erlang-questions] Inspecting a process's binaries

Lukas Larsson lukas@REDACTED
Tue Dec 19 14:17:19 CET 2017


Hello,

On Mon, Dec 18, 2017 at 3:29 PM, Roger Lipscombe <roger@REDACTED>
wrote:

> I can get a list of binaries for a process with process_info(Pid,
> binary), which returns {binary, [{Id, Size, NRefs},...]}.
>
> Given the Id (which looks like 140327404952984, for example), can I
> find out what's *in* that binary?
>

It is not possible without looking under the hood in the VM. The ID is a an
'Binary *', so if you attach to the process using gdb and issue

(gdb) p *(Binary*)(140327404952984)

You should get some information about what the binary is. The same can of
course be done from a core file if you have the ID.

Lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171219/a9b6c53e/attachment.htm>


More information about the erlang-questions mailing list