Ongoing work on LLDB multiprocess debugging support
Links:
Moritz
Systems Project Description URL: https://www.moritz.systems/blog/multiprocess-support-for-lldb/
Progress Report 1 URL:
https://www.moritz.systems/blog/implementing-non-stop-protocol-compatibility-in-lldb/
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. The previous sponsored projects improved LLDB, to make it a credible debugger for the base system, although it still has a few limitations compared to the contemporary versions of GNU GDB. This project started in April 2022. It aims to implement full support for debugging multiple processes simultaneously.
At the start of the project, LLDB featured very limited support
for multiprocess debugging. The client featured support for
debugging multiple independent processes simultaneously via
maintaining multiple connections to different server instances.
Thanks to our earlier work, the server was able to process
fork(2)
and vfork(2)
calls and either
detach the newly forked child and continue tracing the parent
process, or detach the parent and follow the child (equivalent to
GDB’s follow-fork-mode
setting).
Once the project is finished, LLDB will be able to trace an
arbitrary number of forked processes simultaneously (equivalent to
GDB’s detach-on-fork off
). Full support for the
multiprocess extension to the GDB Remote Serial Protocol will be
implemented, as well as partial support for the non-stop extension
that will enable multiple processes to be resumed and stopped
independently.
Sponsor: The FreeBSD Foundation
Last modified on: August 2, 2022 by Lorenzo Salvadore