If I recall correctly off-hand, you need to build the kernel with the KDB/DDB options and then follow the other steps below; I usually build with:
options KDB # Enable kernel debugger support.
options DDB # Support DDB.
options BREAK_TO_DEBUGGER # Remote break to kdb> console
options ALT_BREAK_TO_DEBUGGER # Remote break to kdb> console
options CONSPEED=115200 # Serial console speed
There's no need to build the kernel with DEBUG information or with KGDB support. You can redirect the console to the serial line via the device.hints
, with the following entry (for the first serial port):
At the time of the crash, the kernel debugger should present you with a prompt; please run the `trace`
and `show reg`
commands and post the output.
It's interesting that you only see the problem when enabling support for the FreeBSD AGP driver; this path isn't well excercised due to a variety of compatibility and stability problems and limited chipset support. I'll see if I can reproduce the problem locally.