21.1.2 BSD libkvm Interface
BSD-derived systems (FreeBSD/NetBSD/OpenBSD) have a kernel memory
interface that provides a uniform interface for accessing kernel virtual
memory images, including live systems and crash dumps. gdb
uses this interface to allow you to debug live kernels and kernel crash
dumps on many native BSD configurations. This is implemented as a
kvm debugging target. For debugging a live system, load
the currently running kernel into gdb and connect to the
(gdb) target kvm
For debugging crash dumps, provide the file name of the crash dump as an argument:
(gdb) target kvm /var/crash/bsd.0
- Set current context from the Process Control Block (PCB) address.
- Set current context from proc address. This command isn't available on modern FreeBSD systems.