How to Boot a system with the Kernel Debugger (kmdb) enabled
This is a simple procedure which shows how to load the kernel debugger (kmdb)
- Halt the system, causing it to display the ok prompt. To halt the system cleanly, use the halt command.
- Type either
boot kmdb
orboot -k
to request the loading of the kernel debugger. - Access the kernel debugger.
Note — The method used to enter the debugger depends on the type of console that is used to access the system:
- If you are using a locally attached keyboard, press
Stop-A
orL1—A
, depending on the type of keyboard. - If you are using a serial console, send a break by using the method that is appropriate for your type of serial console.
Rebooting with command: kadb Boot device: /iommu/sbus/espdma@4,800000/esp@4,8800000/sd@3,0 . . .
- If you are using a locally attached keyboard, press
Example
ok boot kmdb Resetting... Executing last command: boot kmdb -d Boot device: /pci@1f,0/ide@d/disk@0,0:a File and args: kmdb -d Loading kmdb...
Note:
- Use the
reboot
command and thehalt
command with the-d
option if you do not have time to debug the system interactively. - Running the
halt
command with the-d
option requires a manual reboot of the system afterwards. However, if you use the reboot command, the system boots automatically. See the reboot(1M) for more information.