LLDB
By the LLVM Project
LLDB is the native debugger built as part of the LLVM project, used to inspect and control the execution of compiled programs written in C-family languages such as C, C++, Objective-C, and Swift. It lets developers set breakpoints, step…
Definition
LLDB is the native debugger built as part of the LLVM project, used to inspect and control the execution of compiled programs written in C-family languages such as C, C++, Objective-C, and Swift. It lets developers set breakpoints, step through code, inspect variables and memory, and evaluate expressions against a running or crashed process. LLDB is the default debugger for several major development toolchains built around LLVM-based compilers.
Overview
Debugging compiled native code requires a specialized tool that can attach to a running process or load a crash dump, translate low-level memory and register state back into source-level concepts like variable names and line numbers, and let a developer control execution step by step. LLDB was built to provide this capability as a modern, modular companion to the LLVM compiler infrastructure, designed from the outset to reuse LLVM's own code-parsing and expression-evaluation components rather than duplicating that logic separately. Mechanically, LLDB reads debug information embedded in compiled binaries to map machine instructions and memory addresses back to source lines, variable names, and type information. It can attach to an already-running process, launch a new process under its control, or load a post-crash core dump, and from any of these states it lets a developer set breakpoints, single-step through execution, inspect the call stack, and evaluate arbitrary expressions in the target program's language using a built-in expression parser and just-in-time compiler shared with LLVM's broader infrastructure. LLDB differs from older native debuggers primarily in its modular architecture, built as a set of reusable libraries rather than a single monolithic tool, which lets other tools and IDEs embed its debugging capabilities directly rather than shelling out to a separate process. It also differs in its tight integration with LLVM-family compilers, since it shares data structures and code for reading debug information generated by those compilers, though it can also debug binaries produced by other compilers as long as they emit compatible debug information. In practice, LLDB is the default debugger bundled with Apple's development tools for building macOS, iOS, and related platform applications, and it is also available as the debugging backend in several editors and IDEs that support LLVM-based toolchains. Developers use it directly from the command line for scripting complex debugging sessions, or indirectly through an IDE's graphical breakpoint and variable inspection interface that calls into LLDB underneath. Its main limitation relative to some competing native debuggers is a smaller base of accumulated command scripts and community tutorials built up over decades, since it is comparatively newer than some entrenched alternatives, though its command syntax and scripting interface have matured significantly. Teams working primarily in a non-LLVM compiler ecosystem, or relying heavily on legacy debugging scripts written for another tool, may find switching debuggers has a learning curve despite LLDB's broad language and platform support. Its scripting interface, exposed through a full programming language binding, also lets developers automate repetitive debugging workflows, which is increasingly valuable for teams debugging complex, long-running, or hard-to-reproduce failures.
Key Features
- Native debugger for C, C++, Objective-C, and Swift binaries
- Modular library architecture embeddable directly into IDEs
- Reads compiler debug information to map memory to source lines
- Built-in expression evaluator sharing LLVM's parsing infrastructure
- Supports live process attachment and post-crash core dump analysis
- Default debugger for Apple's development toolchain