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
320
0
Share
How to Play LLDB in iOS runtime?
Sting Su
May 28, 2019
Other Decks in Programming
See All in Programming
プロパティの順序で型推論が壊れる!? TypeScript6.0の修正からContext-Sensitivityの仕組みを追う
bicstone
2
900
Swiftのレキシカルスコープ管理
kntkymt
0
180
Hive Metastoreを通して学ぶIceberg REST Catalog ― 仕様から実装まで
okumin
0
260
tsserverとは何だったのか、これからどうなるのか
nowaki28
1
340
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
10
1.1k
My daily life on Ruby
a_matsuda
3
430
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
730
Firefoxにコントリビューションして得られた学び
ken7253
2
170
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
2.2k
新規プロダクトを高速で生み出すハーネスエンジニアリング
seanchas116
3
260
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
200
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
480
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
550
Writing Fast Ruby
sferik
630
63k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
420
Site-Speed That Sticks
csswizardry
13
1.2k
Raft: Consensus for Rubyists
vanstee
141
7.4k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
A Soul's Torment
seathinner
6
2.8k
GitHub's CSS Performance
jonrohan
1033
470k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
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