Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
How to Play LLDB in iOS runtime?
Search
Sting Su
May 28, 2019
Programming
0
290
How to Play LLDB in iOS runtime?
Sting Su
May 28, 2019
Tweet
Share
Other Decks in Programming
See All in Programming
Reading Rails 1.0 Source Code
okuramasafumi
0
250
今だからこそ入門する Server-Sent Events (SSE)
nearme_tech
PRO
3
250
250830 IaCの選定~AWS SAMのLambdaをECSに乗り換えたときの備忘録~
east_takumi
0
400
ファインディ株式会社におけるMCP活用とサービス開発
starfish719
0
2k
チームのテスト力を鍛える
goyoki
3
910
Flutter with Dart MCP: All You Need - 박제창 2025 I/O Extended Busan
itsmedreamwalker
0
150
AWS発のAIエディタKiroを使ってみた
iriikeita
1
190
個人開発で徳島大学生60%以上の心を掴んだアプリ、そして手放した話
akidon0000
1
150
複雑なドメインに挑む.pdf
yukisakai1225
5
1.2k
JSONataを使ってみよう Step Functionsが楽しくなる実践テクニック #devio2025
dafujii
1
640
Android端末で実現するオンデバイスLLM 2025
masayukisuda
1
170
ProxyによるWindow間RPC機構の構築
syumai
3
1.2k
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
4 Signs Your Business is Dying
shpigford
184
22k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Statistics for Hackers
jakevdp
799
220k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.2k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
The Language of Interfaces
destraynor
161
25k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
3k
Transcript
How to play with LLDB in iOS runtime? @stinge
• slide url https://ppt.cc/fhdtqx • QR Code
Background stinge • Mercari iOS Engineer • twitter: @StingeSu •
hobby: traveling & cooking
Outline • Why LLDB(Low Level Debugger)? • How LLDB works?
• LLDB OSS • Custom LLDB command
Why LLDB? • high-performance debugger • Clang expression parser &
LLVM disassembler • Default debugger in Xcode • Run Swift REPL & python supported • Save your time
Clang v.s GCC(GNU Compiler Collection) Clang • Apple official compiler
• Frontend for LLVM • High performance • BSD license • …… GCC • Linux based • Support more languages • GPL license
Clang (Xcode 10.2.1) GCC (Darwin Kernel on Raspberry Pi)
• How Apple deprecated GCC Front-end Back-end Xcode 3 GCC
GCC Xcode 4 GCC LLVM Xcode 5 Clang LLVM
• gcc hello.c
Is it good for iOS?
Is it good for iOS? NO
build process
Clang-Swift • The compiler process of swift cmd+B
Clang-Swift • The compiler process of swift Clang AST Reference
https://ppt.cc/fnA4Qx
Clang-Swift • The compiler process of swift
How LLDB works?
How LLDB works? command action option argument
None
• p(print) → expr -- expr -- foo • po(print
object) → expr -O -- expr -O -- foo
p v.s po
None
• Changes the value of variables • Creates temporary variables
• Validates the values
• DEMO • Tasks 1. Changes UIButton title into red
2. Moves UIView up
• Can we use a efficient way to finish these
commands? - YES
LLDB Python API https://lldb.llvm.org/python_reference/index.html
LLDB OSS • Facebook/chisel • DEMO
Customized command • nudge(swift) • DEMO https://gist.github.com/sTinGe/059dc4c15347b7fef4ee537efdcc6e53