=== LLDB Debugger Improvements

Links: +
link:https://www.moritz.systems/blog/freebsd-kgdb-support-in-lldb/[Moritz Systems Project Description] URL: link:https://www.moritz.systems/blog/freebsd-kgdb-support-in-lldb/[link:https://www.moritz.systems/blog/freebsd-kgdb-support-in-lldb/] +
link:https://www.moritz.systems/blog/improving-gdb-protocol-compatibility-in-lldb/[Progress Report 1] URL: link:https://www.moritz.systems/blog/improving-gdb-protocol-compatibility-in-lldb/[https://www.moritz.systems/blog/improving-gdb-protocol-compatibility-in-lldb/] +
link:https://www.moritz.systems/blog/improving-gdb-register-model-compatibility-in-lldb/[Progress Report 2] URL: link:https://www.moritz.systems/blog/improving-gdb-register-model-compatibility-in-lldb/[https://www.moritz.systems/blog/improving-gdb-register-model-compatibility-in-lldb/] +
link:https://github.com/moritz-systems/llvm-project[Git Repository] URL: link:https://github.com/moritz-systems/llvm-project[https://github.com/moritz-systems/llvm-project]

Contact: Kamil Rytarowski <kamil@moritz.systems> +
Contact: Michał Górny <mgorny@moritz.systems>

According to the upstream description, "LLDB is a next generation,
high-performance debugger. It is built as a set of reusable components which
highly leverage existing libraries in the larger LLVM Project, such as the
Clang expression parser and LLVM disassembler."

FreeBSD includes LLDB in the base system.  At present, it has some limitations
compared to the GNU GDB debugger, and does not yet provide a complete
replacement.  This project spans from July 2021 to January 2022 and aims to
make LLDB suitable for debugging FreeBSD kernels.

The work so far was focused on improving the compatibility between LLDB
and other servers implementing the GDB Remote Protocol.  Multiple bugs were
fixed that limited LLDB's functionality when interfacing with GNU GDB's
gdbserver and QEMU's gdbserver implementations.  Support for debugging
executables running on gdbserver architectures other than amd64 was fixed,
and was explicitly tested on arm64 and i386.

This effort also resulted in adjusting lldb-server's implementation
to conform better to the standard set by GDB.  Thanks to these improvements,
the LLDB client needs to provide less divergent code paths depending
on the server used, and the single code path used is tested more thoroughly.

The work also involved improvements to the LLDB API and code deduplication,
that result in reducing the maintenance effort and lowering the bar for future
contributions.  The test coverage was improved, increasing the likelihood that
any future problems will be detected before they affect users.

The introduced changes are expected to be shipped with LLDB 14.0.

Sponsor: The FreeBSD Foundation
