Skip to content

Debugging

Johannes Lundberg edited this page Sep 18, 2018 · 3 revisions

Configuration

For best functionality and "debugability", use the following configuration:

Make sure you have swap partition that can hold a kernel dump.

# /etc/rc.conf

# Load your gpu driver here or manually in console
kld_list="/boot/modules/i915kms.ko"

savecore_enable="YES"
# Sometimes -f flag can help force dumps
savecore_flags="-f"
dumpdev="AUTO"
# /boot/loader.conf

# This will help get a kernel dump
debug.debugger_on_panic=0
dev.drm.skip_ddb="1"
dev.drm.drm_debug_persist=1

# '-1' for full debug logging in dmesg (noisy!)
# Simply change this to 0 when you want to disable debugging.
# The rest of the settings can remain as is as they do no "harm".
dev.drm.drm_debug=-1

Debug

To debug a kernel dump after reboot use:

sudo /usr/libexec/kgdb /usr/lib/debug/boot/kernel/kernel.debug /var/crash/vmcore.last
Clone this wiki locally