<div dir="ltr"><div>Hello,<br><br>I'm using the last erlang package from Erlang Solution (19.0 - seems 19.0.3 is available only if you are using esl-erlang) and I want to debug a generated core dump with GDB.<br><br>The issue I facing is that the beam.smp seems is not including debugging symbols.<br><br>I inspired myself from: <a href="https://www.erlang-solutions.com/blog/how-to-analyse-a-beam-core-dump.html">https://www.erlang-solutions.com/blog/how-to-analyse-a-beam-core-dump.html</a><br><br>I changed a nif library I have to generate a crash.<br><br>when I run :<br><br>gdb my_project/rel/myapp/erts-8.0/bin/beam.smp core.2_scheduler.14306.silviu-desktop.1473754498 -d /home/silviu/Desktop/otp_src_19.0/erts/emulator<br><br>I get this warning first:<br><br>Reading symbols from my_project/rel/myapp/erts-8.0/bin/beam.smp ...(no debugging symbols found)...done.<br><br>Then when I type backtrace:<br><br>#0  memset () at ../sysdeps/x86_64/memset.S:78<br>#1  0x00007ffa712a75cc in fill_window () from /home/silviu/Desktop/my_project/rel/myapp/lib/ezlib-1.0/priv/ezlib_nif.so<br>#2  0x00007ffa712a7f20 in deflate_slow () from /home/silviu/Desktop/my_project/rel/myapp/lib/ezlib-1.0/priv/ezlib_nif.so<br>#3  0x00007ffa712a8fd0 in deflate () from /home/silviu/Desktop/my_project/rel/myapp/lib/ezlib-1.0/priv/ezlib_nif.so<br>#4  0x00007ffa712a6527 in process_buffer (session=0x7ffa71700968, data=<optimized out>, len=<optimized out>) at c_src/ezlib.cc:103<br>#5  0x00007ffa712a6abb in nif_zlib_process_buffer (env=0x7ffaaa13de00, argc=<optimized out>, argv=0x7ffab03c4180) at c_src/ezlib.cc:289<br>#6  0x000000000044426f in process_main ()<br>#7  0x00000000004ce1bd in ?? ()<br>#8  0x00000000005f2fcb in ?? ()<br>#9  0x00007ffaf10a2184 in start_thread (arg=0x7ffaaa13e700) at pthread_create.c:312<br>#10 0x00007ffaf0bc737d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111<br><br>I can see the stack correctly in the ezlib nif I have but not the erlang VM which called the nif which shows as ?? because of the leak of symbols.<br><br>There is any way to fix this ?<br><br>Also I have a second problem when I try to run in gdb:<br><br>source /home/silviu/Desktop/otp_src_19.0/erts/etc/unix/<a href="http://etp-commands.in">etp-commands.in</a><br><br>I get:<br><br>%---------------------------------------------------------------------------<br>% Use etp-help for a command overview and general help.<br>%<br>% To use the Erlang support module, the environment variable ROOTDIR<br>% must be set to the toplevel installation directory of Erlang/OTP,<br>% so the etp-commands file becomes:<br>%     $ROOTDIR/erts/etc/unix/etp-commands<br>% Also, erl and erlc must be in the path.<br>%---------------------------------------------------------------------------<br>etp-set-max-depth 20<br>etp-set-max-string-length 100<br>--------------- System Information ---------------<br>OTP release: /home/silviu/Desktop/otp_src_19.0/erts/etc/unix/<a href="http://etp-commands.in:3812">etp-commands.in:3812</a>: Error in sourced command file:<br>Cannot access memory at address 0x38003931<br><br>Any idea what can be wrong ?<br><br></div>Silviu<br></div>