Debugging Erlang NIF with LLDB

Earlier today I ran across a segfault while trying something with
cberl so I figured it’s time to startup
gdb and see what is going on, but how to actually do that? Luckily
I found a post on the erlang programming
list

with the exact same problem. Since I’m on a Mac I wanted to use
lldb instead so a quick modification to the erl
startup script did the trick.

https://gist.github.com/sideshowcoder/b6fadb6a8f074bfe34c1.js

Now ./rebar skip_deps=true eunit runs erland via lldb and ready to
debug.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.