lldb
LLDB debugger skill for C/C++/Swift/Objective-C programs. Use when debugging with LLDB on macOS, FreeBSD, or Linux-clang environments, mapping GDB mental models to LLDB commands, using LLDB in Xcode or VS Code, or debugging Swift/Objective-C. Activates on queries about LLDB commands, GDB to LLDB mig
By mohitmishra786 · 486 installs
npx skills add mohitmishra786/low-level-dev-skills --skill lldb
Source repository · Upstream listing
LLDB
Purpose
Guide agents through LLDB sessions and map existing GDB knowledge to LLDB. Covers command differences, Apple specifics, Python scripting, and IDE integration.
Triggers
"I'm on macOS and need to debug a C++ program"
"How does LLDB differ from GDB?"
"How do I do [GDB command] in LLDB?"
"LLDB shows <unavailable for variables"
"How do I use LLDB in VS Code?"
"How do I write an LLDB Python script?"
Workflow
1. Start LLDB
2. GDB → LLDB command map
Source: <https://lldb.llvm.org/use/map.html
GDB LLDB Notes
run [args] process launch [args] / r
continue process continue / c
next thread step over / n
step thread step in / s
nexti thread step inst over / ni
stepi thread step inst / si
finish thread step out / finish
break main breakpoint set n main / b main
break file.c:42 breakpoint set f file.c l 42 / b file.c:42
break 0x400abc breakpoint set a 0x400abc / b a 0x400abc
watch x watchpoint set variable x / wa s v x
print x frame variable x / p x
print/x x p/x x
info locals frame variable / fr v
info args frame variable arguments
backtrace thread backtrace / bt
frame N frame select N / f N
info threads thread list
thread N thread select N
thread apply all bt thread backtrace all
x/10wx addr memory read s4 fx c10 addr / x/10xw addr
set var = 42 expression var = 42 / expr var = 42
quit quit / q
3. Breakpoints
4. Inspect state
5. Watchpoints
6. Threads
7. macOS / Apple specifics
8. VS Code integration
Install the CodeLLDB extension. .vscode/launch.json :
9. LLDB Python scripting
Load: command script import /path/to/myscript.py
For a full GDB↔LLDB command map, see [references/gdb lldb map.md](references/gdb lldb map.md).
Related skills
Use skills/debuggers/gdb for GDB workflows
Use skills/debuggers/core dumps for core dump analysis
Use skills/compilers/clang for building with debug info