Chapter 1 - How to get the MorphOS debug log

There are three different but complementary ways to get the MorphOS debug log:


1) Serial debug
   ------------

  In short:
    The debug output is redirected to the RS232 serial port.

  In details:
    This is the preferred debug method because it only  relies  on  the  Quark
    kernel availability. It works even when the rest of  MorphOS  is  unusable
    and it is the only way to debug hardcore problems.

  Usage:
    There is no need to do anything special to enable it  because  it  is  the
    built-in default debug output.

    To capture debug information, you need  a  second  computer,  a  nullmodem
    cable and a serial terminal program. The output speed is  115200  bps  and
    serial settings are 8n1 (eight data bits, no parity, one stop bit).


2) RamDebug
   --------

  In short:
    The debug output is redirected to a memory buffer.

  In details:
    The buffer is managed by the Quark kernel and located outside  the  ABox's
    memory space. It has a limited size (currently 4MB). When it fills up,  it
    will loop around and older entries will be overwritten by new ones.

    Please note some firmware setups always clear memory during the warm  boot
    process. In this case, the RAM content is not preserved and  the  RamDebug
    log is lost after a reboot.

  Usage:
    To activate RamDebug, it is required to boot from the  OpenFirmware  using
    the "ramdebug" argument.
    For example:

      boot boot.img ramdebug

    To take a look at the debug log, it is first needed to manually extract it
    using dedicated tools, such as:

      - "GetRamDebugLog", a basic command line tool. It is able  to  save  the
      RamDebug buffer to a file. It's part of MorphOS 1.4.4 and up.

      - "logTool", a GUI tool. More information at
      http://binaryriot.com/dreamolers/logtool/


3) LogServer
   ---------

  In short:
    The *exception* debug output is redirected in a console window.
    The LogServer is always simultaneously used with Serial or RamDebug.

  In details:
    An exception happens when a program performs an invalid memory  access  or
    executes an illegal processor instruction.
    The LogServer is a dedicated "Log Task"  task  communicating  with  Exec's
    exception-handler. Exec output is caught by the LogServer  and  redirected
    in a console window.

    Please note the  LogServer  doesn't  display  Alert()  content  and  other
    MorphOS debug messages.
    Furthermore, its exception report is very limited and doesn't contain  all
    possible information. Worse, when the LogServer is running, usual RamDebug
    and Serial logs are also modified and even cut down!

    The LogServer is meant to be used complementary with  RamDebug  or  Serial
    debug... and by users only. Programmers should better not use it.

  Usage:
    To activate the  LogServer  when  booting  MorphOS,  use  the  "logserver"
    argument from OpenFirmware. Exemple:

      boot boot.img ramdebug logserver

    You can ask for a bit more informative output:

      boot boot.img ramdebug logserver edebugflags="logextended"

<< Index | First interpretation of a debug log >>