Skip to content

Instantly share code, notes, and snippets.

@Alexander-Ignition
Last active April 20, 2023 11:47
Show Gist options
  • Save Alexander-Ignition/ab04d1b97e60b6774c669a907557554f to your computer and use it in GitHub Desktop.
Save Alexander-Ignition/ab04d1b97e60b6774c669a907557554f to your computer and use it in GitHub Desktop.
lldb cheat sheet for iOS

lldb cheat sheet

expression

po = expression -O --

expression -lang objc -O -- = e -l objc -O --

image

image - commands for accessing information for one or more target modules.

image lookup - look up information within executable and dependent shared library images.

-n <function-or-symbol> ( --name <function-or-symbol> )
    Lookup a function or symbol by name in one or more target modules.

-r ( --regex )
    The <name> argument for name lookups are regular expressions.

-s <symbol> ( --symbol <symbol> )
    Lookup a symbol by name in the symbol tables in one or more target modules.

image lookup -rn NSObject\(IvarDescription\)

NSObject(IvarDescription)

NSObject(IvarDescription) - Objective-C category located in UIKitCore

only for instances

e -l objc -O -- [`self.view` _ivarDescription]
e -l objc -O -- [`self.view` _propertyDescription]

for classes and instances

e -l objc -O -- [UIView _methodDescription]
e -l objc -O -- [UIView _shortMethodDescription]

UIKit

po view.value(forKey: "recursiveDescription")!
po view.value(forKey: "autolayoutTrace")!
e -l objc -O -- [UIViewController _printHierarchy]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment