The Haiku/BeOS Tip Server
Tips and tricks for Haiku/BeOS users

Trapping debug output

Contributed by: Anonymous
This tip is valid for: Both BeOS and Haiku

If you want to debug BeOS or low-level programs like drivers, you can have debug output sent to the syslog, which appears at /var/log/. With this enabled, you’ll find trouble reports at this location each time you boot.

Enable syslog debug output by editing /boot/home/config/settings/ernel/drivers/kernel.

It this file does not exist on your system, copy the sample file from /boot/home/config/settings/kernel/drivers/sample/kernel to that dir. Uncoment theline that reads:

syslog_debug_output true

Then just do a tail -f /var/log/syslog in a Terminal window.

If you have two serial ports and a null modem cable, you can plug the null modem cable into both serial ports, boot with serial debugging enabled, start up SerialConnect on the other machine, and have it listen on serial port 2. You should see the serial debugging output.

If you happen to boot without serial debugging enabled, you can press [Command]-PrintScreen-D to break into the kernel debugger, then type ‘c’ and hit Enter to get out of the debugger. Once in the Kernel Debugging Land (KDL), type help for tons of other commands which can be used from within the debugger.

Posted in Miscellaneous

(comments are closed).