Slide 1

Slide 1 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup LLDB Debugging shoheiyokoyama CA.swift CyberaAgent Presents iOS Developer’s Meetup

Slide 2

Slide 2 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup shoheiyokoyama shoheiyokoyama shoheiyokoyam

Slide 3

Slide 3 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup The LLDB Debugger A next generation, high-performance debugger. LLDB is the default debugger in Xcode on Mac OS X and supports debugging C, Objective-C and C++ on the desktop and iOS devices and simulator. The LLDB Debugger, WHAT IS LLDB?, https://lldb.llvm.org/index.html

Slide 4

Slide 4 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup [-options [option-value]] [argument [argument...]] The LLDB Command

Slide 5

Slide 5 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup (lldb) breakpoint set --file hello.c --line 8 The LLDB Command The LLDB Debugger, GDB TO LLDB COMMAND MAP, https://lldb.llvm.org/lldb-gdb.html

Slide 6

Slide 6 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup (lldb) run

Slide 7

Slide 7 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup ɾThe LLDB Debugging in C program https://github.com/shoheiyokoyama/LLDB-Debugging/tree/master/c ɾThe REPL and Debugger in Swift https://github.com/shoheiyokoyama/LLDB-Debugging/tree/master/swift For more detail…

Slide 8

Slide 8 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup Advanced Debugging with Xcode and LLDB WWDC 2018 - Session 412 https://developer.apple.com/videos/play/wwdc2018/412/

Slide 9

Slide 9 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup The LLDB command (lldb) expression val = something Description: Evaluate an expression on the current thread

Slide 10

Slide 10 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup The LLDB command (lldb) expression label.text = “Hello LLDB” Description: In suspended state, the frame buffer isn't updated. Run expression CATransaction.flush()

Slide 11

Slide 11 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup The LLDB command (lldb) expression -O -- object Description: Display using a language-specific description API, if possible. Output CustomDebugStringConvertible.debugDescription.

Slide 12

Slide 12 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup The LLDB command (lldb) expression -O -- object Description: expression -O -- ==> po

Slide 13

Slide 13 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup The LLDB command (lldb) po label.text = “Hello LLDB”

Slide 14

Slide 14 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup For more detail… ɾThe Debugging with Xcode and LLDB https://github.com/shoheiyokoyama/LLDB-Debugging/tree/master/DBug

Slide 15

Slide 15 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup The LLDB Debugging with Python CA.swift CyberaAgent Presents iOS Developer’s Meetup

Slide 16

Slide 16 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup (lldb) command script import ~/hello.py Import python file

Slide 17

Slide 17 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup Custom LLDB command

Slide 18

Slide 18 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup Config file ~/.lldbinit ~/.lldbinit-Xcode CLI: Xcode: command source ~/.lldbinit

Slide 19

Slide 19 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup facebook / chisel A collection of commands to assist in the debugging of iOS apps https://github.com/facebook/chisel

Slide 20

Slide 20 text

CA.swift CyberaAgent Presents iOS Developer’s Meetup Enjoy LLDB debugging