Skip to main content
Version: master

Building SDKs

Debug emulator

How to Build a Debug Enabled Erlang RunTime System

The erlang recipe from meta-erlang layer provides, via PACKAGECONFIG, a special way in order to build Erlang emulator for debugging purposes. The official Erlang/OTP has all the details about why a special build is necessary, Debug emulator.

Enable with:

PACKAGECONFIG:append:pn-erlang = " emu-type-debug"

Add the feature dbg-pkgs and tools-debug to EXTRA_IMAGE_FEATURES:

EXTRA_IMAGE_FEATURES:append = " dbg-pkgs tools-debug"

Build an image like core-image-minimal:

bitbake core-image-minimal

Run it using qemu:

runqemu core-image-minimal

Two shells:

One for running erl:

erl --emu-type debug

A second one for attaching gdb:

gdb --pid=19

According to Erlang/OTP documentation, the emu-type debug is a special emulator tailored for debugging purposes.