The LLDB Debugger

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.

LLDB is in early development, but is mature enough to support basic debugging scenarios on Mac OS X in C, Objective-C and C++.

All of the code in the LLDB project is available under the standard LLVM License, an open source "BSD-style" license.

Goals

The current state of the art in open source debuggers are that they work in the common cases for C applications, but don't handle many "hard cases" properly. For example, C++ expression parsing, handling overloading, templates, multi-threading, and other non-trivial scenarios all work in some base cases, but don't work reliably.

The goal of LLDB is to provide an amazing debugging experience that "just works". We aim to solve these long-standing problems where debuggers get confused, so that you can think about debugging your problem, not about deficiencies in the debugger.

With a long view, there is no good reason for a debugger to reinvent its own C/C++ parser, type system, know all the target calling convention details, implement its own disassembler, etc. By using the existing libraries vended by the LLVM project, we believe that many of these problems will be defined away, and the debugger can focus on important issues like process control, efficient symbol reading and indexing, thread management, and other debugger-specific problems.

Some more specific goals include:

Why a new debugger?

In order to achieve our goals we decided to start with a fresh architecture that would support modern multi-threaded programs, handle debugging symbols in an efficient manner, use compiler based code knowledge and have plug-in support for functionality and extensions. Additionally we want the debugger capabilities to be available to other analysis tools, be they scripts or compiled programs, without requiring them to be GPL.

Features

LLDB supports a broad variety of basic debugging features such as reading DWARF, supporting step, next, finish, backtraces, etc. Some more interested bits are:

Platform Support

LLDB is known to work on the following platforms, but ports to new platforms are welcome:

  • Machine Architectures:
  • Current Status

    LLDB is in early development and supports basic debugging scenarios on Mac OS X. The public API has not been finalized, and different parts are at different levels of maturity. We welcome any help fleshing out missing pieces and improving the code.

    What works well:

    What is still pretty new:

    What isn't there yet:

    Get it and get involved!

    To check out the code, use:

    Note that LLDB currently only builds out of the box on Darwin with Xcode, but patches to improve portability are definitely welcome.

    Discussions about LLDB should go to the lldb-dev mailing list. Commit messages for the lldb SVN module are automatically sent to the lldb-commits mailing list, and this is also the preferred mailing list for patch submissions.