- 论坛徽章:
- 27
|
How to Build a Debug Enabled Erlang RunTime System
After completing all the normal building steps described above a debug enabled runtime system can be built. To do this you have to change directory to $ERL_TOP/erts/emulator.
In this directory execute:
$ make debug FLAVOR=$FLAVOR
where $FLAVOR is either plain or smp. The flavor options will produce a beam.debug and beam.smp.debug executable respectively. The files are installed along side with the normal (opt) versions beam.smp and beam.
To start the debug enabled runtime system execute:
$ $ERL_TOP/bin/cerl -debug
The debug enabled runtime system features lock violation checking, assert checking and various sanity checks to help a developer ensure correctness. Some of these features can be enabled on a normal beam using appropriate configure options.
There are other types of runtime systems that can be built as well using the similar steps just described.
$ make $TYPE FLAVOR=$FLAVOR
where $TYPE is opt, gcov, gprof, debug, valgrind, or lcnt. These different beam types are useful for debugging and profiling purposes. |
|