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
スケールする組織の実現に向けた インナーソース育成術 - ISGT2025
teamlab
PRO
2
170
もうちょっといいRubyプロファイラを作りたい (2025)
osyoyu
1
460
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
570
How Android Uses Data Structures Behind The Scenes
l2hyunwoo
0
480
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
1.3k
Testing Trophyは叫ばない
toms74209200
0
890
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
22
5.9k
HTMLの品質ってなんだっけ? “HTMLクライテリア”の設計と実践
unachang113
4
2.9k
テストコードはもう書かない:JetBrains AI Assistantに委ねる非同期処理のテスト自動設計・生成
makun
0
540
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
24
12k
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
3.4k
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
280
Featured
See All Featured
Scaling GitHub
holman
463
140k
Become a Pro
speakerdeck
PRO
29
5.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Practical Orchestrator
shlominoach
190
11k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
KATA
mclloyd
32
14k
Six Lessons from altMBA
skipperchong
28
4k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
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