Also, do not forget to specify the correct path to your swap device as it is likely different than [.filename]#/dev/ad0s1b#!
====
+[TIP]
+====
+If your system is crashing regularly and you are running out of disk space,
+deleting old [.filename]#vmcore# files in [.filename]#/var/crash# can free a considerable amount of disk space.
+====
+
=== Testing Kernel Dump Configuration
The kernel includes a man:sysctl[8] node that requests a kernel panic.
@@ -164,8 +171,147 @@
After rebooting, your system should save a dump in [.filename]#/var/crash# along with a matching summary from man:crashinfo[8].
+[[kerneldebug-crashdump]]
+== Debugging a Kernel Crash Dump
+
+FreeBSD kernel crash dumps can be debugged with man:lldb[1] or man:kgdb[1].
+Both are actively supported by FreeBSD developers.
+For LLDB issues, open an issue in the LLVM GitHub repository and notify @mchoo7 and @aokblast.
+For KGDB issues, file a report in FreeBSD Bugzilla for the package:devel/gdb[] port.
+
+.Comparison of LLDB and KGDB
+[cols="2,3,3", options="header"]
+|===
+| Feature
+| LLDB
+| KGDB
+
+| Availability
+| Included in the base system; also available through package:devel/llvm-24[].
+| Available through package:devel/gdb[].
+
+| License
+| Apache License 2.0 with LLVM Exception.
+| GPLv3.
+
+| Supported platforms
+| All platforms supported by FreeBSD except 32-bit PowerPC and big-endian 64-bit PowerPC. Trapframe unwinding is unavailable on i386.
+| All platforms supported by FreeBSD.
+
+| Supported FreeBSD versions
+| FreeBSD 14 and later. Trapframe unwinding requires FreeBSD 15.1 or later, or FreeBSD 14.6 or later on stable/14.
+| All FreeBSD versions, including some end-of-life releases.
+
+| Helper scripts
+| None provided in the FreeBSD repository.
+| Available under [.filename]#sys/tools/gdb#.
+|===
+
+The following subsections show how to obtain a backtrace and locate the relevant source code.
+Most developers will ask for at least this information if you cannot debug the problem yourself.
+If you solve the problem, submit your patch for inclusion in the source tree through a problem report or mailing list, or commit it if you have access.
+
+[[kerneldebug-lldb]]
+=== Kernel Crash Dump Debugging Using LLDB
+
+[IMPORTANT]
+====
+LLDB 24 or later is required for full FreeBSD kernel debugging support.
+Earlier versions support kernel debugging only partially.
+Quitting LLDB will kill one or more processes. Do you really want to proceed: [Y/n] y
+....
+
[[kerneldebug-gdb]]
-== Debugging a Kernel Crash Dump with `kgdb`
+=== Kernel Crash Dump Debugging Using KGDB
[NOTE]
====
@@ -202,8 +348,6 @@
The output below has been modified to include line numbers on the left.
This first trace inspects the instruction pointer and obtains a back trace.
The address that is used on line 41 for the `list` command is the instruction pointer and can be found on line 17.
-Most developers will request having at least this information sent to them if you are unable to debug the problem yourself.
-If, however, you do solve the problem, make sure that your patch winds its way into the source tree via a problem report, mailing lists, or by being able to commit it!
[source,bash]
....
@@ -299,12 +443,6 @@
90:(kgdb) quit
....
-[TIP]
-====
-If your system is crashing regularly and you are running out of disk space,
-deleting old [.filename]#vmcore# files in [.filename]#/var/crash# could save a considerable amount of disk space!