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
LLDB
Search
Khoa Pham
August 27, 2015
Programming
0
410
LLDB
Tips on using LLDB
Khoa Pham
August 27, 2015
Tweet
Share
More Decks by Khoa Pham
See All by Khoa Pham
Introduction to Swiftlane
onmyway133
0
150
Better AppStore rating
onmyway133
0
560
Pragmatic Machine Learning for mobile apps
onmyway133
0
430
Unit Testing in iOS
onmyway133
0
520
Getting started with Flutter
onmyway133
2
630
From Xcode plugin to Xcode extension
onmyway133
0
410
Collection Update
onmyway133
4
420
A Taste of MVVM + RxSwift
onmyway133
1
580
Block
onmyway133
0
520
Other Decks in Programming
See All in Programming
Spring gRPC で始める gRPC 入門 / Introduction to gRPC with Spring gRPC
mackey0225
0
140
推論された型の移植性エラーTS2742に挑む
teamlab
PRO
0
150
TypeScriptのmoduleオプションを改めて整理する
bicstone
4
430
Javaのルールをねじ曲げろ!禁断の操作とその代償から学ぶメタプログラミング入門 / A Guide to Metaprogramming: Lessons from Forbidden Techniques and Their Price
nrslib
1
300
Feature Flag 自動お掃除のための TypeScript プログラム変換
azrsh
PRO
4
630
事業戦略を理解してソフトウェアを設計する
masuda220
PRO
8
1.5k
技術的負債と戦略的に戦わざるを得ない場合のオブザーバビリティ活用術 / Leveraging Observability When Strategically Dealing with Technical Debt
yoshiyoshifujii
0
160
Javaに鉄道指向プログラミング (Railway Oriented Pro gramming) のエッセンスを取り入れる/Bringing the Essence of Railway-Oriented Programming to Java
cocet33000
1
130
TypeScript だけを書いて Tauri でデスクトップアプリを作ろう / Tauri with only TypeScript
tris5572
2
540
MLOps Japan 勉強会 #52 - 特徴量を言語を越えて一貫して管理する, 『特徴量ドリブン』な MLOps の実現への試み
taniiicom
2
570
Building an Application with TDD, DDD and Hexagonal Architecture - Isn't it a bit too much?
mufrid
0
370
TSConfig Solution Style & subpath imports to switch types on a per-file basis
maminami373
1
180
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.6k
Making Projects Easy
brettharned
116
6.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
How GitHub (no longer) Works
holman
314
140k
Code Review Best Practice
trishagee
68
18k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.5k
Side Projects
sachag
454
42k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.6k
Building Applications with DynamoDB
mza
95
6.4k
Transcript
LLDB Khoa Pham - 2359 Media
LLDB Home page http://lldb.llvm.org/ LLDB is an open-source debugger that
features a REPL, along with C++ and Python plugins
Menu - Command - Use cases - Python - Chisel
- Standalone
Command
Command - help Information on any command help print help
thread continue help help
Command - print Print value print a print self
Command Prefix matching print, prin, pri, p expression, e Can’t
use pr (print or process?)
Command $ variable Anything starting with a dollar sign is
in LLDB’ s namespace and exists to help you print $0 + 7
Command - expression Evaluate an expression (ObjC++ or Swift) in
the current program context, Modify values in the program expression $0 = 10 e $0 = 10
Command - print 'print' is an abbreviation for 'expression --'.
Use -- to signify the end of the flags and the beginning of the input e --location -- -count
Command - print object See the description method of an
object e -O -- aString po aString
Command - variable The variable must start with a dollar
sign e NSInteger $b = 10; p $b + a
Command - flow Continue process continue, continue, c Step over
thread step-over, next, n
Command - flow Step into thread step-in, step, s Step
out thread step-out, finish
Command - thread return Executes the return command, jumping out
of the current stack frame thread return YES
Breakpoint List breakpoints br li Create breakpoints br set -f
ViewController.m 39
Use cases Find targets of a button po [self.myButton allTargets]
Use cases See the frame po self.view.frame e @import UIKit
po self.view.frame
Use cases Change background color without continue e self.view.backgroundColor =
[UIColor greenColor] e (void)[CATransaction flush]
Use cases Watch variable wivar self _number
Python LLDB has full, built-in Python support. If you type
script in LLDB, it will open a Python REPL
.lldbinit Executed every time LLDB starts command script import /path/to/fblldb.py
Chisel brew update brew install chisel # ~/.lldbinit command script
import /path/to/fblldb.py
Standalone Using LLDB as a Standalone Debugger
References - Getting Started with LLDB - Dancing in the
Debugger — A Waltz with LLDB - Video Tutorial: Using LLDB in iOS - Navigating and discovering an iOS codebase using lldb - chisel