The FreeBSD kernel has bugs just like any other piece of software. To aid in the investigation and fixing of bugs, FreeBSD provides several kernel debugging tools. Some of the tools are services within the kernel itself such as DDB. Other tools are outside of the kernel such as kgdb. As with other tools, skilled use is obtained from practice and a bit of trial and error.