LLDB Scripting for iOS Developers
summary
Shows a working LLDB Python script that reads two consecutive pointers from a Swift closure (function pointer + capture context), uses SBProcess.read_memory to extract 8‑byte values, and registers a summary via type summary add -F so Xcode and LLDB display the context pointer. Demonstrates copying that address into Xcode’s memory graph (Malostack logging) to backtrack closure creation; notes closures are 16 bytes but LLDB may report 8, and the script successfully surfaces the missing context for real debugging.
AI-written summary · about
chapters (11)
- 0:00Introduction to LLDB
- 3:39Why use LLDB
- 6:09What is LLDB
- 10:23Memory logging in Xcode
- 13:16Setting up Python environment
- 16:07Writing first LLDB script
- 18:38LLDB API basics
- 21:08Implementing closure formatter
- 23:37Live demo and results
- 24:42Resources and summary
- 25:30Q&A session
related talks
46mUsing LLDB, Instruments, and Xcode to understand a codebase
45mDebug like a Pro
45mAdvanced Debugging with XCode – Extending LLDB
37mTake your iOS debugging skills to the next level
31mMemory Graph Debugger
42mWhat Really Happens When You Hit a Breakpoint
21mAdvanced Debugging Techniques
15mGive me 15 minutes & I'll change your view of GDB
