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
300
How to Play LLDB in iOS runtime?
Sting Su
May 28, 2019
Tweet
Share
Other Decks in Programming
See All in Programming
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
220
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
310
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
270
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
980
高速開発のためのコード整理術
sutetotanuki
1
400
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
590
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
2026年 エンジニアリング自己学習法
yumechi
0
140
Featured
See All Featured
AI: The stuff that nobody shows you
jnunemaker
PRO
2
260
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Designing Powerful Visuals for Engaging Learning
tmiket
0
240
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
How to Ace a Technical Interview
jacobian
281
24k
How STYLIGHT went responsive
nonsquared
100
6k
Bash Introduction
62gerente
615
210k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Discover your Explorer Soul
emna__ayadi
2
1.1k
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