lldb
LLVM debugger
TLDR
Debug executable
$ lldb [program]
Debug with arguments$ lldb -- [program] [arg1] [arg2]
Attach to process$ lldb -p [pid]
Attach by name$ lldb -n [process_name]
Run commands on start$ lldb -o "[breakpoint set -n main]" [program]
Load core dump$ lldb -c [core] [program]
SYNOPSIS
lldb [options] [program] [-- args]
DESCRIPTION
lldb is the LLVM debugger. It debugs C, C++, Objective-C, and Swift programs.
The tool provides breakpoints, watchpoints, stepping, and memory inspection. It's the default debugger on macOS.
PARAMETERS
PROGRAM
Executable to debug.-p PID
Attach to process by PID.-n NAME
Attach to process by name.-c CORE
Load core dump file.-o CMD
Execute command on start.-s FILE
Source commands from file.--help
Display help information.
CAVEATS
Requires debug symbols. Different commands than gdb. Part of LLVM toolchain.
HISTORY
LLDB was developed by Apple as part of LLVM, providing a modern debugger with modular architecture.
SEE ALSO
gdb(1), clang(1), llvm-symbolizer(1)
