This dragon image is owned by Apple Inc.
The Moritz Systems team has started a new contract on improving the LLDB support for FreeBSD.
The LLDB project builds on libraries provided by
LLVM and Clang to provide a great
modern debugger. It uses the Clang ASTs and expression parser, LLVM JIT,
LLVM disassembler, etc so that it provides an experience that “just works”.
It is also blazing fast and more permissively licensed than GDB, the GNU Debugger.
LLDB is the default debugger in Xcode on macOS and supports debugging C,
Objective-C and C++ on the desktop and iOS devices and simulator.
FreeBSD includes LLDB, the debugger in the LLVM family, in the base
system. At present it has some limitations in comparison with the GNU
GDB debugger, and does not yet provide a complete replacement. It
relies on an obsolete plugin model in LLDB that causes growing
technical debt. This project aims to bring LLDB closer to a fully
featured replacement for GDB, and therefore for FreeBSD to feature a
modern debugger for software developers.
The legacy monolithic target support executed the application being
debugged in the same process space as the debugger. The modern LLDB
plugin approach, used on other supported targets, executes the
target process under a separate lldb-server process. This improves
reliability and simplifies the process / thread model in LLDB itself.
In addition, remote and local debugging will both be performed using
the same approach.
After the migration to the new process model is complete the project
will include reviewing the results of LLDB’s test suite and fixing
tests as time permits. The work will complete in 2020.
The Project Schedule is divided into three milestones, each taking
approximately one month:
- M1 Introduce new FreeBSD Remote Process Plugin for x86_64 with basic support and upstream to LLVM.
- M2 Ensure and add the mandated features in the project (process launch, process attach (pid), process attach (name), userland core files, breakpoints, watchpoints, threads, remote debugging) for FreeBSD/amd64 and FreeBSD/i386.
- M3 Iterate over the LLDB tests. Detect and as time permits fix bugs. Ensure bug reports for each non-fixed and known problem. Add missing man pages and update the FreeBSD Handbook.
This work is sponsored by The FreeBSD Foundation.