Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-doc
Path: blob/main/website/content/en/status/report-2021-07-2021-09/lldb.adoc
18096 views
=== 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 <[email protected]> +
Contact: Michał Górny <[email protected]>

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