<div dir="ltr"><div>After I compiled erlang from sources I don't have any longer this issues. I compiled with systemtap support. <br><br></div>Silviu<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 13, 2016 at 12:50 PM, Caragea Silviu <span dir="ltr"><<a href="mailto:silviu.cpp@gmail.com" target="_blank">silviu.cpp@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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" target="_blank">https://www.erlang-solutions.<wbr>com/blog/how-to-analyse-a-<wbr>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/<wbr>bin/beam.smp core.2_scheduler.14306.silviu-<wbr>desktop.1473754498 -d /home/silviu/Desktop/otp_src_<wbr>19.0/erts/emulator<br><br>I get this warning first:<br><br>Reading symbols from my_project/rel/myapp/erts-8.0/<wbr>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_<wbr>project/rel/myapp/lib/ezlib-1.<wbr>0/priv/ezlib_nif.so<br>#2 0x00007ffa712a7f20 in deflate_slow () from /home/silviu/Desktop/my_<wbr>project/rel/myapp/lib/ezlib-1.<wbr>0/priv/ezlib_nif.so<br>#3 0x00007ffa712a8fd0 in deflate () from /home/silviu/Desktop/my_<wbr>project/rel/myapp/lib/ezlib-1.<wbr>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/<wbr>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_<wbr>19.0/erts/etc/unix/<a href="http://etp-commands.in" target="_blank">etp-<wbr>commands.in</a><br><br>I get:<br><br>%-----------------------------<wbr>------------------------------<wbr>----------------<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-<wbr>commands<br>% Also, erl and erlc must be in the path.<br>%-----------------------------<wbr>------------------------------<wbr>----------------<br>etp-set-max-depth 20<br>etp-set-max-string-length 100<br>--------------- System Information ---------------<br>OTP release: /home/silviu/Desktop/otp_src_<wbr>19.0/erts/etc/unix/<a href="http://etp-commands.in:3812" target="_blank">etp-<wbr>commands.in:3812</a>: Error in sourced command file:<br>Cannot access memory at address 0x38003931<br><br>Any idea what can be wrong ?<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Silviu<br></font></span></div>
</blockquote></div><br></div>