[erlang-questions] How to best debug init.erl?

Peer Stritzinger <>
Thu Apr 19 20:37:21 CEST 2012


while porting Erlang to a embedded system with the RTEMS os I'm stuck
currently with error exits in init.erl


{"init terminating in do_boot",{'cannot load',error_handler,get_file}}

How can debug stuff like this?

I'm loading the OS + Erlang with a JTAG debug box and gdb, debugging
the C startup works fine this way but once I'm in Erlang code I'm

Currently I'm not getting crash dumps either (crash dumps not yet ported).

I'm playing with "print debugging" -- adding erlang:display/1 calls
which leads me to another problem and my second question:

What do I have to do to rebuild with changes in init.erl ...
especially for cross building.

The way I'm building now looks like this:

  $  ./otp_build autoconf
  $  ./otp_build configure
--xcomp-conf=xcomp/erl-xcomp-powerpc-rtems.conf --disable-threads
  $  ./otp_build boot -a
  $  rm -rf ~/export/otp; gmake install DESTDIR=$HOME/export

The export/otp dir is NFS mounted to the target system.

Even if I re-configure the changes in init.erl are not reflected on
the target system.

-- Peer

More information about the erlang-questions mailing list